verify that the "aws-global" is used for sts in test

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
Tim Ramlot 2024-06-19 15:00:37 +02:00
parent 8cec055234
commit 537e71ee63
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D

View File

@ -253,7 +253,8 @@ func TestAssumeRole(t *testing.T) {
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
provider := makeMockSessionProvider(func(aws.Config) StsClient {
provider := makeMockSessionProvider(func(cfg aws.Config) StsClient {
assert.Equal(t, "aws-global", cfg.Region) // verify that the global sts endpoint is used
return c.mockSTS
}, c.key, c.secret, c.region, c.role, c.webIdentityToken, c.ambient)
cfg, err := provider.GetSession(context.TODO())