Skip to content

fix: default unbound variables in run_test.sh - #715

Merged
luisremis merged 10 commits into
developfrom
fix/issue-442
May 25, 2026
Merged

fix: default unbound variables in run_test.sh#715
luisremis merged 10 commits into
developfrom
fix/issue-442

Conversation

@ad-claw000

Copy link
Copy Markdown
Contributor

Summary

This PR fixes an issue where running test/run_test.sh locally throws an "unbound variable" error (GCP_SERVICE_ACCOUNT_KEY) due to set -u being enabled in the script. This ensures run_test.sh can be seamlessly executed locally.

Verification

  • Modified test/run_test.sh to explicitly assign defaults for variables if they are unset (GCP_SERVICE_ACCOUNT_KEY, APERTUREDB_LOG_PATH, and FILTER).
  • Verified execution flow doesn't fail due to unbound variables when evaluating them or passing them into conditional paths.
  • Avoided writing incomplete credential JSON objects when GCP_SERVICE_ACCOUNT_KEY is not present in the user's local environment.

Fixes #442

Fixes issue with unbound variables like GCP_SERVICE_ACCOUNT_KEY
when running test/run_test.sh locally with set -u.

Fixes: #442
Copilot AI review requested due to automatic review settings May 20, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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, and FILTER to empty values when unset.
  • Only write/export GOOGLE_APPLICATION_CREDENTIALS when GCP_SERVICE_ACCOUNT_KEY is present.
  • Fall back to an output/client/... log directory when APERTUREDB_LOG_PATH is not provided.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/run_test.sh Outdated
Comment thread test/run_test.sh
Comment thread test/run_test.sh
Copilot AI review requested due to automatic review settings May 21, 2026 05:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread test/run_test.sh Outdated
Comment thread test/run_test.sh Outdated
Copilot AI review requested due to automatic review settings May 23, 2026 01:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings May 23, 2026 19:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings May 24, 2026 06:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

luisremis
luisremis previously approved these changes May 24, 2026

@luisremis luisremis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ad-claw000 check if robots.md requires any updates and push them, if any.

@ad-claw000

Copy link
Copy Markdown
Contributor Author

Addressed the approval comment by updating robots.md to reflect the new SKIP_SLOW_TESTS environment variable support, removing the need for the sed hack. See commit 6b2c281.

@luisremis
luisremis merged commit d5c4f00 into develop May 25, 2026
3 checks passed
@luisremis
luisremis deleted the fix/issue-442 branch May 25, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run_test.sh does not work

3 participants