File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ describe('Test scale up lambda wrapper.', () => {
12
12
resolve ( ) ;
13
13
} ) ;
14
14
} ) ;
15
- await expect ( handler ( { } , { } , { } ) ) . resolves ;
15
+ await expect ( handler ( { } , { } ) ) . resolves ;
16
16
} ) ;
17
17
18
18
it ( 'Scale without error should resolve2 . ' , async ( ) => {
19
19
const mock = mocked ( sync ) ;
20
20
mock . mockRejectedValue ( new Error ( '' ) ) ;
21
21
22
- await expect ( handler ( { } , { } , { } ) ) . resolves ;
22
+ await expect ( handler ( { } , { } ) ) . resolves ;
23
23
} ) ;
24
24
} ) ;
Original file line number Diff line number Diff line change @@ -2,15 +2,13 @@ import { sync } from './syncer/syncer';
2
2
import { logger } from './syncer/logger' ;
3
3
4
4
// 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 > {
6
6
logger . setSettings ( { requestId : context . awsRequestId } ) ;
7
7
logger . debug ( JSON . stringify ( event ) ) ;
8
8
9
9
try {
10
10
await sync ( ) ;
11
- callback ( null ) ;
12
11
} catch ( e ) {
13
12
logger . warn ( 'Ignoring error:' , e ) ;
14
- callback ( e ) ;
15
13
}
16
14
}
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ export async function sync(): Promise<void> {
125
125
const currentVersion = await getCachedVersion ( s3 , cacheObject ) ;
126
126
logger . debug ( 'latest: ' + currentVersion ) ;
127
127
if ( currentVersion === undefined || currentVersion != actionRunnerReleaseAsset . name ) {
128
- uploadToS3 ( s3 , cacheObject , actionRunnerReleaseAsset ) ;
128
+ await uploadToS3 ( s3 , cacheObject , actionRunnerReleaseAsset ) ;
129
129
} else {
130
130
logger . debug ( 'Distribution is up-to-date, no action.' ) ;
131
131
}
You can’t perform that action at this time.
0 commit comments