Skip to content

Commit

Permalink
Add integration test case for default provider
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Aug 20, 2024
1 parent de30cbd commit 790f4bd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions integration/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,17 @@ func TestOidc(t *testing.T) {
assert.NotNil(t, c.AccessKeyId)
assert.NotNil(t, c.AccessKeySecret)
assert.NotNil(t, c.SecurityToken)
assert.Equal(t, "oidc_role_arn", *c.Type)
}

func TestDefaultProvider(t *testing.T) {
cred, err := credentials.NewCredential(nil)
assert.Nil(t, err)
assert.NotNil(t, cred)
c, err := cred.GetCredential()
assert.Nil(t, err)
assert.NotNil(t, c.AccessKeyId)
assert.NotNil(t, c.AccessKeySecret)
assert.NotNil(t, c.SecurityToken)
assert.Equal(t, "oidc_role_arn", *c.Type)
}

0 comments on commit 790f4bd

Please sign in to comment.