Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix potential for user-agent lang value mismatch in tests #2888

Merged
merged 3 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changelog/23e49414655246ba97c2d1991c0daf67.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "23e49414-6552-46ba-97c2-d1991c0daf67",
"type": "bugfix",
"description": "Fix potential for user agent language mismatch in tests.",
"modules": [
"."
]
}
6 changes: 5 additions & 1 deletion aws/middleware/user_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)

var expectedAgent = aws.SDKName + "/" + aws.SDKVersion + " os/" + getNormalizedOSName() + " lang/go#" + languageVersion + " md/GOOS#" + runtime.GOOS + " md/GOARCH#" + runtime.GOARCH
var expectedAgent = aws.SDKName + "/" + aws.SDKVersion +
" os/" + getNormalizedOSName() +
" lang/go#" + strings.Map(rules, languageVersion) + // normalize as the user-agent builder will
" md/GOOS#" + runtime.GOOS +
" md/GOARCH#" + runtime.GOARCH

func TestRequestUserAgent_HandleBuild(t *testing.T) {
cases := map[string]struct {
Expand Down
Loading