@@ -16,8 +16,6 @@ export const test = base.extend<{ testEnvironment: LocalLambdaStack; lambdaClien
1616 async ( { } , use ) => {
1717 console . log ( '[testEnvironment fixture] Setting up AWS Lambda test infrastructure' ) ;
1818
19- console . log ( 'NODE_VERSION' , process . env . NODE_VERSION ) ;
20-
2119 execSync ( 'docker network prune -f' ) ;
2220 execSync ( `docker network create --driver bridge ${ DOCKER_NETWORK_NAME } ` ) ;
2321
@@ -31,25 +29,23 @@ export const test = base.extend<{ testEnvironment: LocalLambdaStack; lambdaClien
3129 const debugLog = tmp . fileSync ( { prefix : 'sentry_aws_lambda_tests_sam_debug' , postfix : '.log' } ) ;
3230 console . log ( `[test_environment fixture] Writing SAM debug log to: ${ debugLog . name } ` ) ;
3331
34- const args = [
35- 'local' ,
36- 'start-lambda' ,
37- '--debug' ,
38- '--template' ,
39- SAM_TEMPLATE_FILE ,
40- '--warm-containers' ,
41- 'EAGER' ,
42- '--docker-network' ,
43- DOCKER_NETWORK_NAME ,
44- ] ;
45-
46- if ( process . env . NODE_VERSION ) {
47- args . push ( '--invoke-image' , `public.ecr.aws/sam/build-nodejs${ process . env . NODE_VERSION } .x:latest` ) ;
48- }
49-
50- const samProcess = spawn ( 'sam' , args , {
51- stdio : [ 'ignore' , debugLog . fd , debugLog . fd ] ,
52- } ) ;
32+ const process = spawn (
33+ 'sam' ,
34+ [
35+ 'local' ,
36+ 'start-lambda' ,
37+ '--debug' ,
38+ '--template' ,
39+ SAM_TEMPLATE_FILE ,
40+ '--warm-containers' ,
41+ 'EAGER' ,
42+ '--docker-network' ,
43+ DOCKER_NETWORK_NAME ,
44+ ] ,
45+ {
46+ stdio : [ 'ignore' , debugLog . fd , debugLog . fd ] ,
47+ } ,
48+ ) ;
5349
5450 try {
5551 await LocalLambdaStack . waitForStack ( ) ;
@@ -58,12 +54,12 @@ export const test = base.extend<{ testEnvironment: LocalLambdaStack; lambdaClien
5854 } finally {
5955 console . log ( '[testEnvironment fixture] Tearing down AWS Lambda test infrastructure' ) ;
6056
61- samProcess . kill ( 'SIGTERM' ) ;
57+ process . kill ( 'SIGTERM' ) ;
6258 await new Promise ( resolve => {
63- samProcess . once ( 'exit' , resolve ) ;
59+ process . once ( 'exit' , resolve ) ;
6460 setTimeout ( ( ) => {
65- if ( ! samProcess . killed ) {
66- samProcess . kill ( 'SIGKILL' ) ;
61+ if ( ! process . killed ) {
62+ process . kill ( 'SIGKILL' ) ;
6763 }
6864 resolve ( void 0 ) ;
6965 } , 5000 ) ;
0 commit comments