@@ -136,7 +136,7 @@ if (!local) {
136136 core . startGroup ( 'Delete service if already exists' ) ;
137137 try {
138138 await zx `fastly service delete --quiet --service-name "${ serviceName } " --force --token $FASTLY_API_TOKEN` ;
139- } catch { }
139+ } catch { }
140140 core . endGroup ( ) ;
141141 core . startGroup ( 'Build and deploy service' ) ;
142142 await zx `npm i` ;
@@ -170,13 +170,13 @@ await Promise.all([
170170 27 ,
171171 local
172172 ? [
173- // we expect it to take ~10 seconds to deploy, so focus on that time
174- 6000 , 3000 , 1500 , 500 , 500 , 500 , 500 , 500 , 500 , 500 , 500 , 500 , 500 ,
175- 500 , 500 , 500 , 500 , 500 , 500 , 500 , 500 , 500 ,
176- // after more than 20 seconds, means we have an unusually slow build, start backoff before timeout
177- 1500 ,
178- 3000 , 6000 , 12000 , 24000 ,
179- ] . values ( )
173+ // we expect it to take ~10 seconds to deploy, so focus on that time
174+ 6000 , 3000 , 1500 , 500 , 500 , 500 , 500 , 500 , 500 , 500 , 500 , 500 , 500 ,
175+ 500 , 500 , 500 , 500 , 500 , 500 , 500 , 500 , 500 ,
176+ // after more than 20 seconds, means we have an unusually slow build, start backoff before timeout
177+ 1500 ,
178+ 3000 , 6000 , 12000 , 24000 ,
179+ ] . values ( )
180180 : expBackoff ( '60s' , '10s' ) ,
181181 async ( ) => {
182182 const response = await request ( domain ) ;
@@ -275,12 +275,12 @@ for (const chunk of chunks(Object.entries(tests), 100)) {
275275 case 'first-chunk-only' :
276276 for await ( const chunk of response . body ) {
277277 bodyChunks . push ( chunk ) ;
278- response . body . on ( 'error' , ( ) => { } ) ;
278+ response . body . on ( 'error' , ( ) => { } ) ;
279279 break ;
280280 }
281281 break ;
282282 case 'none' :
283- response . body . on ( 'error' , ( ) => { } ) ;
283+ response . body . on ( 'error' , ( ) => { } ) ;
284284 break ;
285285 case 'full' :
286286 default :
@@ -302,22 +302,22 @@ for (const chunk of chunks(Object.entries(tests), 100)) {
302302 }
303303 let onInfoHandler = test . downstream_info
304304 ? async ( status , headers ) => {
305- if (
306- test . downstream_info . status !== undefined &&
307- test . downstream_info . status != status
308- ) {
309- throw new Error (
310- `[DownstreamInfo: Status mismatch] Expected: ${ configResponse . status } - Got: ${ status } }` ,
311- ) ;
312- }
313- if ( headers ) {
314- compareHeaders (
315- configResponse . headers ,
316- headers ,
317- configResponse . headersExhaustive ,
318- ) ;
319- }
305+ if (
306+ test . downstream_info . status !== undefined &&
307+ test . downstream_info . status != status
308+ ) {
309+ throw new Error (
310+ `[DownstreamInfo: Status mismatch] Expected: ${ configResponse . status } - Got: ${ status } }` ,
311+ ) ;
312+ }
313+ if ( headers ) {
314+ compareHeaders (
315+ configResponse . headers ,
316+ headers ,
317+ configResponse . headersExhaustive ,
318+ ) ;
320319 }
320+ }
321321 : undefined ;
322322
323323 if ( local ) {
@@ -456,7 +456,7 @@ if (!local && failed.length) {
456456 core . notice ( `Tests failed.` ) ;
457457}
458458
459- if ( ! local && ! skipTeardown && failed . length === 0 ) {
459+ if ( ! local && ! skipTeardown ) {
460460 const teardownPath = join ( __dirname , 'teardown.js' ) ;
461461 if ( existsSync ( teardownPath ) ) {
462462 core . startGroup ( 'Tear down the extra set-up for the service' ) ;
0 commit comments