Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tests): organize workflows, add system tests #7695

Merged
merged 14 commits into from
Sep 27, 2024
Merged

Conversation

bshaffer
Copy link
Contributor

@bshaffer bshaffer commented Sep 24, 2024

The new system-tests.yaml workflow has passed, but it's being skipped in this PR.

@bshaffer bshaffer added the next release PRs to be included in the next release label Sep 27, 2024
@bshaffer bshaffer marked this pull request as ready for review September 27, 2024 17:04
@bshaffer bshaffer requested review from a team as code owners September 27, 2024 17:04
@@ -212,6 +213,9 @@ public static function generatedSystemTestBootstrap()
// For generated system tests, we need to set GOOGLE_APPLICATION_CREDENTIALS
// and PROJECT_ID to appropriate values
$keyFilePath = getenv('GOOGLE_CLOUD_PHP_TESTS_KEY_PATH');
if (empty($keyFilePath)) {
exit('GOOGLE_CLOUD_PHP_TESTS_KEY_PATH must be set to run system tests.');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:
Should we place this as a constant somewhere? I see that this env is used in several places. I think if this code needs maintenance it would be easier to have all of the places using one constant and easy to change in one place rather than using a string.

Copy link
Contributor Author

@bshaffer bshaffer Sep 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes absolutely. I've added your suggestion (and some of my own) in this issue so that we can clean this part up soon

#7709

$keyFilePath = getenv('GOOGLE_CLOUD_PHP_TESTS_KEY_PATH');
$keyFileData = json_decode(file_get_contents($keyFilePath), true);
$projectId = $keyFileData['project_id'];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

json_decode can return false, should we check for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, done!

@bshaffer bshaffer enabled auto-merge (squash) September 27, 2024 19:02
@bshaffer bshaffer merged commit e13bf25 into main Sep 27, 2024
32 checks passed
@bshaffer bshaffer deleted the integration-test-suite branch September 27, 2024 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next release PRs to be included in the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants