Skip to content

Commit

Permalink
fix potential for lang mismatch in user agent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lucix-aws committed Nov 5, 2024
1 parent 061540b commit e3964cf
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit e3964cf

Please sign in to comment.