Skip to content

Commit 21bd350

Browse files
committed
Add missing await
1 parent ba504f8 commit 21bd350

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/lambda.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ describe('Test scale up lambda wrapper.', () => {
1212
resolve();
1313
});
1414
});
15-
await expect(handler({}, {}, {})).resolves;
15+
await expect(handler({}, {})).resolves;
1616
});
1717

1818
it('Scale without error should resolve2 . ', async () => {
1919
const mock = mocked(sync);
2020
mock.mockRejectedValue(new Error(''));
2121

22-
await expect(handler({}, {}, {})).resolves;
22+
await expect(handler({}, {})).resolves;
2323
});
2424
});

modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/lambda.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ import { sync } from './syncer/syncer';
22
import { logger } from './syncer/logger';
33

44
// eslint-disable-next-line
5-
export async function handler(event: any, context: any, callback: any): Promise<void> {
5+
export async function handler(event: any, context: any): Promise<void> {
66
logger.setSettings({ requestId: context.awsRequestId });
77
logger.debug(JSON.stringify(event));
88

99
try {
1010
await sync();
11-
callback(null);
1211
} catch (e) {
1312
logger.warn('Ignoring error:', e);
14-
callback(e);
1513
}
1614
}

modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/syncer/syncer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export async function sync(): Promise<void> {
125125
const currentVersion = await getCachedVersion(s3, cacheObject);
126126
logger.debug('latest: ' + currentVersion);
127127
if (currentVersion === undefined || currentVersion != actionRunnerReleaseAsset.name) {
128-
uploadToS3(s3, cacheObject, actionRunnerReleaseAsset);
128+
await uploadToS3(s3, cacheObject, actionRunnerReleaseAsset);
129129
} else {
130130
logger.debug('Distribution is up-to-date, no action.');
131131
}

0 commit comments

Comments
 (0)