Skip to content

Commit 2e4f529

Browse files
committed
fix auth2 unit test
1 parent 01da622 commit 2e4f529

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

packages/core/src/test/credentials/auth2.test.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -638,11 +638,13 @@ describe('IamLogin', () => {
638638
}
639639

640640
const mockGetIamCredentialResponse: GetIamCredentialResult = {
641-
id: 'test-credential-id',
642-
credentials: {
643-
accessKeyId: 'encrypted-access-key',
644-
secretAccessKey: 'encrypted-secret-key',
645-
sessionToken: 'encrypted-session-token',
641+
credential: {
642+
id: 'test-credential-id',
643+
credentials: {
644+
accessKeyId: 'encrypted-access-key',
645+
secretAccessKey: 'encrypted-secret-key',
646+
sessionToken: 'encrypted-session-token',
647+
}
646648
},
647649
updateCredentialsParams: {
648650
data: 'credential-data',
@@ -682,7 +684,7 @@ describe('IamLogin', () => {
682684
)
683685
sinon.assert.calledOnce(lspAuth.getIamCredential)
684686
sinon.assert.match(iamLogin.getConnectionState(), 'connected')
685-
sinon.assert.match(response.id, 'test-credential-id')
687+
sinon.assert.match(response.credential.id, 'test-credential-id')
686688
})
687689
})
688690

@@ -705,7 +707,7 @@ describe('IamLogin', () => {
705707

706708
sinon.assert.calledOnce(lspAuth.getIamCredential)
707709
sinon.assert.match(iamLogin.getConnectionState(), 'connected')
708-
sinon.assert.match(response.id, 'test-credential-id')
710+
sinon.assert.match(response.credential.id, 'test-credential-id')
709711
})
710712
})
711713

0 commit comments

Comments
 (0)