Skip to content

Commit

Permalink
Update signingroundtripper_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
schannag committed Dec 18, 2024
1 parent b7f6c6b commit cdbd89a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions extension/sigv4authextension/signingroundtripper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ func TestInferServiceAndRegion(t *testing.T) {
req5, err := http.NewRequest(http.MethodGet, "https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-XXX/api/v1/remote_write", nil)
assert.NoError(t, err)

req6, err := http.NewRequest(http.MethodGet, "https://logs.us-east-1.amazonaws.com/v1/logs", nil)
assert.NoError(t, err)

req7, err := http.NewRequest(http.MethodGet, "https://xray.us-east-1.amazonaws.com/v1/traces", nil)
assert.NoError(t, err)

tests := []struct {
name string
request *http.Request
Expand Down Expand Up @@ -152,6 +158,20 @@ func TestInferServiceAndRegion(t *testing.T) {
"service",
"region",
},
{
"match_with_config",
req6,
&Config{Region: "region", Service: "service", AssumeRole: AssumeRole{ARN: "rolearn", STSRegion: "region"}},
"service",
"region",
},
{
"match_with_config",
req7,
&Config{Region: "region", Service: "service", AssumeRole: AssumeRole{ARN: "rolearn", STSRegion: "region"}},
"service",
"region",
},
}

// run tests
Expand Down

0 comments on commit cdbd89a

Please sign in to comment.