Skip to content

Commit

Permalink
integrationtest: Change GetSessionToken to GetCallerIdentity (#1493)
Browse files Browse the repository at this point in the history
  • Loading branch information
skmcgrail authored Nov 12, 2021
1 parent 4ceb619 commit d26d207
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions service/internal/integrationtest/sts/smoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/internal/integrationtest"
)

func TestInteg_00_GetSessionToken(t *testing.T) {
func TestInteg_00_GetCallerIdentity(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()

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

client := sts.NewFromConfig(cfg)
params := &sts.GetSessionTokenInput{}
_, err = client.GetSessionToken(ctx, params)
params := &sts.GetCallerIdentityInput{}
resp, err := client.GetCallerIdentity(ctx, params)
if err != nil {
t.Errorf("expect no error, got %v", err)
}

if len(aws.ToString(resp.Account)) == 0 {
t.Errorf("expect account to not be empty")
}
}

func TestInteg_01_GetFederationToken(t *testing.T) {
Expand Down

0 comments on commit d26d207

Please sign in to comment.