Skip to content

Commit 5524a1d

Browse files
authored
Merge branch 'main' into npalm/docs-modules
2 parents 3f37461 + 2302e48 commit 5524a1d

File tree

19 files changed

+141
-144
lines changed

19 files changed

+141
-144
lines changed

lambdas/functions/ami-housekeeper/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@types/aws-lambda": "^8.10.145",
2121
"@types/jest": "^29.5.12",
2222
"@types/node": "^22.5.4",
23-
"@typescript-eslint/eslint-plugin": "^7.18.0",
23+
"@typescript-eslint/eslint-plugin": "^8.8.1",
2424
"@typescript-eslint/parser": "^8.8.0",
2525
"@vercel/ncc": "^0.38.1",
2626
"aws-sdk-client-mock": "^4.0.2",

lambdas/functions/ami-housekeeper/src/lambda.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('Housekeeper ami', () => {
5252
resolve();
5353
});
5454
});
55-
expect(await handler(undefined, context)).resolves;
55+
await expect(handler(undefined, context)).resolves.not.toThrow();
5656
});
5757

5858
it('should not thow only log in error in case of an exception.', async () => {

lambdas/functions/control-plane/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@types/aws-lambda": "^8.10.145",
2121
"@types/jest": "^29.5.12",
2222
"@types/node": "^22.5.4",
23-
"@typescript-eslint/eslint-plugin": "^7.18.0",
23+
"@typescript-eslint/eslint-plugin": "^8.8.1",
2424
"@typescript-eslint/parser": "^8.8.0",
2525
"@vercel/ncc": "^0.38.1",
2626
"aws-sdk-client-mock": "^4.0.2",

lambdas/functions/control-plane/src/aws/runners.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ describe('create runner with errors', () => {
383383
it('test now error is thrown if an instance is created', async () => {
384384
createFleetMockWithErrors(['NonMappedError'], ['i-123']);
385385

386-
expect(await createRunner(createRunnerConfig(defaultRunnerConfig))).resolves;
386+
await expect(createRunner(createRunnerConfig(defaultRunnerConfig))).resolves.toEqual(['i-123']);
387387
expect(mockEC2Client).toHaveReceivedCommandWith(
388388
CreateFleetCommand,
389389
expectedCreateFleetRequest(defaultExpectedFleetRequestValues),

lambdas/functions/control-plane/src/github/octokit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ describe('Test getOctokit', () => {
6363
mockOctokit.apps.getOrgInstallation.mockRejectedValue(new Error('Error'));
6464
}
6565

66-
expect(await getOctokit('', input.orgLevelRunner, payload)).resolves;
66+
await expect(getOctokit('', input.orgLevelRunner, payload)).resolves.toBeDefined();
6767

6868
if (output.callOrgInstallation) {
6969
expect(mockOctokit.apps.getOrgInstallation).toHaveBeenCalled();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('Test scale up lambda wrapper.', () => {
8686
resolve();
8787
});
8888
});
89-
expect(await scaleUpHandler(sqsEvent, context)).resolves;
89+
await expect(scaleUpHandler(sqsEvent, context)).resolves.not.toThrow();
9090
});
9191

9292
it('Non scale should resolve.', async () => {
@@ -206,7 +206,7 @@ describe('Test job retry check wrapper', () => {
206206
resolve();
207207
});
208208
});
209-
expect(await jobRetryCheck(sqsEvent, context)).resolves;
209+
await expect(jobRetryCheck(sqsEvent, context)).resolves.not.toThrow();
210210
});
211211

212212
it('Handle with error should resolve and log only a warning.', async () => {
@@ -216,7 +216,7 @@ describe('Test job retry check wrapper', () => {
216216
const error = new Error('Error handling retry check.');
217217
mock.mockRejectedValue(error);
218218

219-
expect(await jobRetryCheck(sqsEvent, context)).resolves;
219+
await expect(jobRetryCheck(sqsEvent, context)).resolves.not.toThrow();
220220
expect(logSpyWarn).toHaveBeenCalledWith(expect.stringContaining(error.message), expect.anything());
221221
});
222222
});

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ describe('Scale down runners', () => {
182182
expect(listEC2Runners).toHaveBeenCalledWith({
183183
environment: ENVIRONMENT,
184184
});
185-
expect(terminateRunner).not;
186-
expect(mockOctokit.apps.getRepoInstallation).not;
187-
expect(mockOctokit.apps.getRepoInstallation).not;
185+
expect(terminateRunner).not.toHaveBeenCalled();
186+
expect(mockOctokit.apps.getRepoInstallation).not.toHaveBeenCalled();
187+
expect(mockOctokit.apps.getRepoInstallation).not.toHaveBeenCalled();
188188
});
189189

190190
it(`Should terminate runner without idle config ${type} runners.`, async () => {

lambdas/functions/gh-agent-syncer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@types/jest": "^29.5.12",
2222
"@types/node": "^22.5.4",
2323
"@types/request": "^2.48.12",
24-
"@typescript-eslint/eslint-plugin": "^7.18.0",
24+
"@typescript-eslint/eslint-plugin": "^8.8.1",
2525
"@typescript-eslint/parser": "^8.8.0",
2626
"@vercel/ncc": "^0.38.1",
2727
"aws-sdk-client-mock": "^4.0.2",

lambdas/functions/gh-agent-syncer/src/syncer/syncer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async function getCachedVersion(s3Client: S3Client, cacheObject: CacheObject): P
2525
const objectTagging = await s3Client.send(command);
2626
const versions = objectTagging.TagSet?.filter((t: Tag) => t.Key === versionKey);
2727
return versions?.length === 1 ? versions[0].Value : undefined;
28-
} catch (e) {
28+
} catch {
2929
logger.debug('No tags found');
3030
return undefined;
3131
}

lambdas/functions/termination-watcher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@types/aws-lambda": "^8.10.145",
1919
"@types/jest": "^29.5.12",
2020
"@types/node": "^22.5.4",
21-
"@typescript-eslint/eslint-plugin": "^7.18.0",
21+
"@typescript-eslint/eslint-plugin": "^8.8.1",
2222
"@typescript-eslint/parser": "^8.8.0",
2323
"@vercel/ncc": "^0.38.1",
2424
"aws-sdk-client-mock": "^4.0.2",

0 commit comments

Comments
 (0)