Skip to content

Commit

Permalink
feat: add subjectClaim test
Browse files Browse the repository at this point in the history
  • Loading branch information
hertzsprung committed Oct 14, 2023
1 parent 48f10a4 commit 351434f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/oidc-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('GithubActionRole construct', () => {
});
});

test('basic configuration with multiple repos', () => {
test('basic configuration with multiple repos and subject claims', () => {
// GIVEN
const stack = new Stack();

Expand All @@ -50,6 +50,10 @@ describe('GithubActionRole construct', () => {
'myuser/myrepo2',
'myuser/myrepo3',
],
subjectClaims: [
'repo:owner/repo1:ref:refs/heads/branch1',
'repo:owner/repo1:environment:prod',
],
});

// THEN
Expand All @@ -69,6 +73,8 @@ describe('GithubActionRole construct', () => {
'repo:myuser/myrepo:*',
'repo:myuser/myrepo2:*',
'repo:myuser/myrepo3:*',
'repo:owner/repo1:ref:refs/heads/branch1',
'repo:owner/repo1:environment:prod',
],
},
},
Expand Down

0 comments on commit 351434f

Please sign in to comment.