Skip to content

Commit a218024

Browse files
Copilotstuartp44
andauthored
Add listEC2Runners verification to maximum runners test (#4980)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: stuartp44 <[email protected]>
1 parent 20ec578 commit a218024

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ secrets.auto.tfvars
2929

3030
node_modules/
3131
site/
32+
lambdas/package-lock.json

lambdas/functions/control-plane/src/scale-runners/scale-up.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,6 +1756,13 @@ describe('Retry mechanism tests', () => {
17561756

17571757
await scaleUpModule.scaleUp(messages);
17581758

1759+
// Verify listEC2Runners is called to check current runner count
1760+
expect(listEC2Runners).toHaveBeenCalledWith({
1761+
environment: 'unit-test-environment',
1762+
runnerType: 'Org',
1763+
runnerOwner: TEST_DATA_SINGLE.repositoryOwner,
1764+
});
1765+
17591766
// publishRetryMessage should still be called even though no runners will be created
17601767
expect(mockPublishRetryMessage).toHaveBeenCalledTimes(2);
17611768
expect(createRunner).not.toHaveBeenCalled();

0 commit comments

Comments
 (0)