Skip to content

Commit

Permalink
fix unit tests (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
hari-rad authored and BenSNews committed Mar 29, 2023
1 parent 24ef0ea commit 0945a48
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,7 @@ describe('Configure AWS Credentials', () => {
RoleArn: 'arn:aws:iam::111111111111:role/MY-ROLE',
RoleSessionName: 'GitHubActions',
DurationSeconds: 6 * 3600,
WebIdentityToken: 'testpayload',
SourceIdentity: GITHUB_ACTOR_SANITIZED
WebIdentityToken: 'testpayload'
})
});

Expand All @@ -625,8 +624,7 @@ describe('Configure AWS Credentials', () => {
RoleArn: 'arn:aws:iam::111111111111:role/MY-ROLE',
RoleSessionName: 'GitHubActions',
DurationSeconds: 6 * 3600,
WebIdentityToken: 'testpayload',
SourceIdentity: GITHUB_ACTOR_SANITIZED
WebIdentityToken: 'testpayload'
})
});

Expand All @@ -643,8 +641,7 @@ describe('Configure AWS Credentials', () => {
RoleArn: 'arn:aws:iam::111111111111:role/MY-ROLE',
RoleSessionName: 'GitHubActions',
DurationSeconds: 3600,
WebIdentityToken: 'testtoken',
SourceIdentity: GITHUB_ACTOR_SANITIZED
WebIdentityToken: 'testtoken'
});
expect(core.setSecret).toHaveBeenNthCalledWith(1, FAKE_STS_ACCESS_KEY_ID);
expect(core.setSecret).toHaveBeenNthCalledWith(2, FAKE_STS_SECRET_ACCESS_KEY);
Expand All @@ -664,8 +661,7 @@ describe('Configure AWS Credentials', () => {
RoleArn: 'arn:aws:iam::111111111111:role/MY-ROLE',
RoleSessionName: 'GitHubActions',
DurationSeconds: CUSTOM_ROLE_DURATION,
WebIdentityToken: 'testtoken',
SourceIdentity: GITHUB_ACTOR_SANITIZED
WebIdentityToken: 'testtoken'
});
expect(core.setSecret).toHaveBeenNthCalledWith(1, FAKE_STS_ACCESS_KEY_ID);
expect(core.setSecret).toHaveBeenNthCalledWith(2, FAKE_STS_SECRET_ACCESS_KEY);
Expand Down

0 comments on commit 0945a48

Please sign in to comment.