Skip to content

fix: mock GetBucketRegion in shared_test.go#406

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:oadp-devfrom
kaovilai:fix-shared-test-mock-bucket-region
Jun 8, 2026
Merged

fix: mock GetBucketRegion in shared_test.go#406
openshift-merge-bot[bot] merged 1 commit into
openshift:oadp-devfrom
kaovilai:fix-shared-test-mock-bucket-region

Conversation

@kaovilai

@kaovilai kaovilai commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary

TestGetRegistryEnvsForLocation in shared_test.go was hitting real S3 to determine bucket region, causing CI failures when no AWS credentials are available. Mock GetBucketRegionFunc the same way s3_test.go and registry_test.go already do (via PR #365).

Also fixes wantErrString to match the full wrapped error from GetRegistryEnvsForLocation.

Other branches

This fix is also included in:

🤖 Generated with Claude Code

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 8, 2026
TestGetRegistryEnvsForLocation was hitting real S3 to determine
bucket region, causing CI failures when no AWS credentials are
available. Mock GetBucketRegionFunc like s3_test.go and
registry_test.go already do.

Also fix wantErrString to match the full wrapped error from
GetRegistryEnvsForLocation.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
@kaovilai kaovilai force-pushed the fix-shared-test-mock-bucket-region branch from ca992dc to fba54dd Compare June 8, 2026 18:06
@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown

@kaovilai: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@shubham-pampattiwar shubham-pampattiwar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2026
@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaovilai, shubham-pampattiwar, sseago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [kaovilai,shubham-pampattiwar,sseago]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit 5e83429 into openshift:oadp-dev Jun 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants