Skip to content

Commit

Permalink
Add missing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
gertjanmaas committed May 11, 2020
1 parent c3de745 commit 007e6b8
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ describe('list instances', () => {
});
});

it('filters instances on org name', async () => {
await listRunners({ environment: 'unit-test-environment' });
expect(mockEC2.describeInstances).toBeCalledWith({
Filters: [
{ Name: 'tag:Application', Values: ['github-action-runner'] },
{ Name: 'instance-state-name', Values: ['running', 'pending'] },
{ Name: 'tag:Environment', Values: ['unit-test-environment'] },
],
});
});

it('filters instances on both org name and repo name', async () => {
await listRunners({ orgName: 'SomeAwesomeCoder', repoName: 'SomeAwesomeCoder/some-amazing-library' });
expect(mockEC2.describeInstances).toBeCalledWith({
Expand Down

0 comments on commit 007e6b8

Please sign in to comment.