@@ -61,11 +61,9 @@ describe('Docker CLI interception', function () {
6161
6262 // Run the resulting container via the intercepting Docker proxy:
6363 const { server, httpsConfig} = await testSetup ;
64- const mainRule = await server . get ( 'https://example.test' ) . thenReply ( 200 ) ;
64+ const mainRule = await server . forGet ( 'https://example.test' ) . thenReply ( 200 ) ;
6565
66- const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } , {
67- dockerEnabled : true
68- } ) ;
66+ const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } ) ;
6967
7068 childProc . spawn (
7169 'docker' , [ 'run' , '--rm' , imageId , 'https://example.test' ] ,
@@ -94,11 +92,9 @@ describe('Docker CLI interception', function () {
9492 it ( "should intercept 'docker run' launching a remote image" , async ( ) => {
9593 const { server, httpsConfig } = await testSetup ;
9694
97- const mainRule = await server . get ( "https://example.test" ) . thenReply ( 200 ) ;
95+ const mainRule = await server . forGet ( "https://example.test" ) . thenReply ( 200 ) ;
9896
99- const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } , {
100- dockerEnabled : true
101- } ) ;
97+ const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } ) ;
10298
10399 const { exitCode, stdout, stderr } = await spawnToResult (
104100 'docker' , [ 'run' , '--rm' , 'node:14' , '-e' , `require("https").get("https://example.test")` ] ,
@@ -120,11 +116,9 @@ describe('Docker CLI interception', function () {
120116
121117 const { server, httpsConfig } = await testSetup ;
122118
123- const mainRule = await server . anyRequest ( ) . thenReply ( 200 , "Mock response\n" ) ;
119+ const mainRule = await server . forAnyRequest ( ) . thenReply ( 200 , "Mock response\n" ) ;
124120
125- const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } , {
126- dockerEnabled : true
127- } ) ;
121+ const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } ) ;
128122
129123 const { exitCode, stdout, stderr } = await spawnToResult ( 'docker' , [ 'build' , '.' ] , {
130124 env : { ...process . env , ...terminalEnvOverrides } ,
@@ -191,11 +185,11 @@ Successfully built <hash>
191185 this . timeout ( 30000 ) ;
192186
193187 const { server, httpsConfig, getPassThroughOptions } = await testSetup ;
194- const externalRule = await server . anyRequest ( )
188+ const externalRule = await server . forAnyRequest ( )
195189 . forHost ( "example.test" )
196190 . thenReply ( 200 , "Mock response" ) ;
197191 const internalRule = await server
198- . unmatchedRequest ( )
192+ . forUnmatchedRequest ( )
199193 . thenPassThrough ( {
200194 proxyConfig : ruleParams [ `docker-tunnel-proxy-${ server . port } ` ] ,
201195 ...( await getPassThroughOptions ( ) )
@@ -209,9 +203,7 @@ Successfully built <hash>
209203 true
210204 ) ;
211205
212- const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } , {
213- dockerEnabled : true
214- } ) ;
206+ const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } ) ;
215207
216208 // "DC Up" the same project, but in an intercepted env. Should ignore the existing containers,
217209 // create new intercepted containers, and then up those as normal.
@@ -242,11 +234,11 @@ Successfully built <hash>
242234 this . timeout ( 30000 ) ;
243235
244236 const { server, httpsConfig, getPassThroughOptions } = await testSetup ;
245- await server . anyRequest ( )
237+ await server . forAnyRequest ( )
246238 . forHost ( "example.test" )
247239 . thenReply ( 200 , "Mock response" ) ;
248240 await server
249- . unmatchedRequest ( )
241+ . forUnmatchedRequest ( )
250242 . thenPassThrough ( {
251243 proxyConfig : ruleParams [ `docker-tunnel-proxy-${ server . port } ` ] ,
252244 ...( await getPassThroughOptions ( ) )
@@ -260,9 +252,7 @@ Successfully built <hash>
260252 true
261253 ) ;
262254
263- const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } , {
264- dockerEnabled : true
265- } ) ;
255+ const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } ) ;
266256
267257 // "DC Up" the same project, but in an intercepted env. Should ignore the existing containers,
268258 // create new intercepted containers, and then up those as normal.
@@ -296,9 +286,7 @@ Successfully built <hash>
296286 it ( "should clean up containers after shutdown" , async ( ) => {
297287 const { server, httpsConfig } = await testSetup ;
298288
299- const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } , {
300- dockerEnabled : true
301- } ) ;
289+ const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } ) ;
302290
303291 const uninterceptedResult = await spawnToResult ( 'docker' , [ 'create' , 'node:14' ] ) ;
304292
@@ -340,9 +328,7 @@ Successfully built <hash>
340328 const { server, httpsConfig } = await testSetup ;
341329 const docker = new Docker ( ) ;
342330
343- const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } , {
344- dockerEnabled : true
345- } ) ;
331+ const terminalEnvOverrides = getTerminalEnvVars ( server . port , httpsConfig , process . env , { } ) ;
346332
347333 // Tunnel doesn't start preemptively:
348334 await delay ( 500 ) ;
0 commit comments