File tree 1 file changed +7
-3
lines changed
service/internal/integrationtest/sts
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import (
16
16
"github.com/aws/aws-sdk-go-v2/service/internal/integrationtest"
17
17
)
18
18
19
- func TestInteg_00_GetSessionToken (t * testing.T ) {
19
+ func TestInteg_00_GetCallerIdentity (t * testing.T ) {
20
20
ctx , cancelFn := context .WithTimeout (context .Background (), 5 * time .Second )
21
21
defer cancelFn ()
22
22
@@ -26,11 +26,15 @@ func TestInteg_00_GetSessionToken(t *testing.T) {
26
26
}
27
27
28
28
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 )
31
31
if err != nil {
32
32
t .Errorf ("expect no error, got %v" , err )
33
33
}
34
+
35
+ if len (aws .ToString (resp .Account )) == 0 {
36
+ t .Errorf ("expect account to not be empty" )
37
+ }
34
38
}
35
39
36
40
func TestInteg_01_GetFederationToken (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments