From af7c74db03c834b36a37a2d93234350cf1951121 Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Thu, 29 Aug 2024 10:58:58 +0800 Subject: [PATCH] add test case for ram role arn with sts token --- credentials/credential_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/credentials/credential_test.go b/credentials/credential_test.go index b509c39..6243914 100644 --- a/credentials/credential_test.go +++ b/credentials/credential_test.go @@ -216,6 +216,12 @@ func TestNewCredentialWithRAMRoleARN(t *testing.T) { cred, err = NewCredential(config) assert.Nil(t, err) assert.NotNil(t, cred) + + // with sts should ok + config.SetSecurityToken("securitytoken") + cred, err = NewCredential(config) + assert.Nil(t, err) + assert.NotNil(t, cred) } func TestNewCredentialWithBearerToken(t *testing.T) {