diff --git a/extension/sigv4authextension/signingroundtripper_test.go b/extension/sigv4authextension/signingroundtripper_test.go index 89ba2d3d924a..6d9eb78c9ad5 100644 --- a/extension/sigv4authextension/signingroundtripper_test.go +++ b/extension/sigv4authextension/signingroundtripper_test.go @@ -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 @@ -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