fix: default unbound variables in run_test.sh - #715
Merged
Conversation
Fixes issue with unbound variables like GCP_SERVICE_ACCOUNT_KEY when running test/run_test.sh locally with set -u. Fixes: #442
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates test/run_test.sh to avoid “unbound variable” failures under set -u when running the test script locally without certain CI-provided environment variables.
Changes:
- Default
GCP_SERVICE_ACCOUNT_KEY,APERTUREDB_LOG_PATH, andFILTERto empty values when unset. - Only write/export
GOOGLE_APPLICATION_CREDENTIALSwhenGCP_SERVICE_ACCOUNT_KEYis present. - Fall back to an
output/client/...log directory whenAPERTUREDB_LOG_PATHis not provided.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…erver hang, and simplify pytest args
luisremis
previously approved these changes
May 24, 2026
luisremis
left a comment
Contributor
There was a problem hiding this comment.
@ad-claw000 check if robots.md requires any updates and push them, if any.
Contributor
Author
|
Addressed the approval comment by updating |
luisremis
approved these changes
May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes an issue where running
test/run_test.shlocally throws an "unbound variable" error (GCP_SERVICE_ACCOUNT_KEY) due toset -ubeing enabled in the script. This ensuresrun_test.shcan be seamlessly executed locally.Verification
test/run_test.shto explicitly assign defaults for variables if they are unset (GCP_SERVICE_ACCOUNT_KEY,APERTUREDB_LOG_PATH, andFILTER).GCP_SERVICE_ACCOUNT_KEYis not present in the user's local environment.Fixes #442