Skip to content

Commit e9a9cab

Browse files
committed
chore: improve pool branch test coverage
1 parent f8bc290 commit e9a9cab

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lambdas/functions/control-plane/src/pool/pool.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ describe('Test simple pool.', () => {
268268
});
269269

270270
it('Should not top up if pool size is invalid.', async () => {
271+
process.env.RUNNER_LABELS = undefined;
271272
await expect(await adjust({ poolSize: -2 })).resolves;
272273
expect(createRunners).not.toHaveBeenCalled();
273274
});
@@ -369,6 +370,10 @@ describe('Test simple pool.', () => {
369370
status: 'queued',
370371
labels: [...LABELS, 'label3'],
371372
},
373+
{
374+
status: 'queued',
375+
labels: [],
376+
},
372377
]);
373378
await expect(await adjust({ poolSize: -1 })).resolves;
374379
expect(createRunners).not.toHaveBeenCalled();

lambdas/functions/control-plane/src/pool/pool.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ export async function adjust(event: PoolEvent): Promise<void> {
6969
const ghAuth = await createGithubInstallationAuth(installationId, ghesApiUrl);
7070
const githubInstallationClient = await createOctoClient(ghAuth.token, ghesApiUrl);
7171

72-
githubInstallationClient.paginate;
73-
7472
// Get statusses of runners registed in GitHub
7573
const runnerStatusses = await getGitHubRegisteredRunnnerStatusses(
7674
githubInstallationClient,

0 commit comments

Comments
 (0)