Repository navigation
test(s3): the HeadBucket probe test tolerates the trailing slash smithy-go now sends - #583
Merged
Merged
Conversation
…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.
3 tasks
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.
Unblocks #577 (production-dependencies group: aws-sdk-go-v2 1.47.1, smithy-go 1.28.2, and four others), which is red on
testandcoveragefrom one assertion: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
go.mod/go.sumapplied (reproduced the failure locally first).ListBuckets— kept compiling, since a mutant that doesn't build proves nothing — the test fails withprobe request = "GET /". The other case it exists to reject, a HeadBucket on an empty name, isHEAD /, which trims toHEADand still doesn't match.Test-only, so no CHANGELOG entry.
🤖 Generated with Claude Code