Skip to content

test(s3): the HeadBucket probe test tolerates the trailing slash smithy-go now sends - #583

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/headbucket-trailing-slash
Oct 6, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/headbucket-trailing-slash

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

Unblocks #577 (production-dependencies group: aws-sdk-go-v2 1.47.1, smithy-go 1.28.2, and four others), which is red on test and coverage from one assertion:

pool_health_test.go:126: probe request = "HEAD /the-pools-bucket/", want "HEAD /the-pools-bucket"

Cause

smithy-go v1.28.2's changelog: "JoinPath keeps a trailing slash when the added path is a slash." HeadBucket's path template is /, so the path-style request gained a trailing slash. The probe still does exactly what the test requires — a HeadBucket on the pool's own bucket — and both forms address the same bucket. Every other test in the suite, including all the substrate-backed ones, passed on the new SDK.

Fix

Trim one trailing slash before comparing. Only the test changes; no production code, no dependency change.

Verification

  • Passes on the current SDK and with deps(deps): bump the production-dependencies group across 1 directory with 6 updates #577's go.mod/go.sum applied (reproduced the failure locally first).
  • Mutation: with the probe replaced by ListBuckets — kept compiling, since a mutant that doesn't build proves nothing — the test fails with probe request = "GET /". The other case it exists to reject, a HeadBucket on an empty name, is HEAD /, which trims to HEAD and still doesn't match.

Test-only, so no CHANGELOG entry.

🤖 Generated with Claude Code

…hy-go now sends

smithy-go v1.28.2 ("JoinPath keeps a trailing slash when the added path is a
slash") changed HeadBucket's path-style request from HEAD /bucket to
HEAD /bucket/. TestTestConnection_ProbesTheConfiguredBucket matched the path
exactly, so the production-dependencies bump in #577 went red on test and
coverage with the probe doing exactly what the test exists to require.

Trim one trailing slash before comparing. The two requests the test exists
to reject still fail: ListBuckets is GET / (verified by mutating the probe to
ListBuckets - the test fails with probe request = "GET /"), and a HeadBucket
on an empty name is HEAD /, which trims to HEAD and does not match.

Passes against both the current SDK and the one #577 brings in.
@scttfrdmn
scttfrdmn merged commit 37d4087 into main Oct 6, 2026
42 checks passed
@scttfrdmn
scttfrdmn deleted the fix/headbucket-trailing-slash branch October 6, 2026 15:57
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.

1 participant