Skip to content

Commit d26d207

Browse files
authored
integrationtest: Change GetSessionToken to GetCallerIdentity (#1493)
1 parent 4ceb619 commit d26d207

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

service/internal/integrationtest/sts/smoke_test.go

+7-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/aws/aws-sdk-go-v2/service/internal/integrationtest"
1717
)
1818

19-
func TestInteg_00_GetSessionToken(t *testing.T) {
19+
func TestInteg_00_GetCallerIdentity(t *testing.T) {
2020
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
2121
defer cancelFn()
2222

@@ -26,11 +26,15 @@ func TestInteg_00_GetSessionToken(t *testing.T) {
2626
}
2727

2828
client := sts.NewFromConfig(cfg)
29-
params := &sts.GetSessionTokenInput{}
30-
_, err = client.GetSessionToken(ctx, params)
29+
params := &sts.GetCallerIdentityInput{}
30+
resp, err := client.GetCallerIdentity(ctx, params)
3131
if err != nil {
3232
t.Errorf("expect no error, got %v", err)
3333
}
34+
35+
if len(aws.ToString(resp.Account)) == 0 {
36+
t.Errorf("expect account to not be empty")
37+
}
3438
}
3539

3640
func TestInteg_01_GetFederationToken(t *testing.T) {

0 commit comments

Comments
 (0)