@@ -56,6 +56,7 @@ describe('getCreateArgs', () => {
5656 [ 'use' , 'true' ] ,
5757 [ 'cache-binary' , 'true' ] ,
5858 [ 'cleanup' , 'true' ] ,
59+ [ 'keep-state' , 'false' ]
5960 ] ) ,
6061 [
6162 'create' ,
@@ -74,6 +75,7 @@ describe('getCreateArgs', () => {
7475 [ 'use' , 'true' ] ,
7576 [ 'cache-binary' , 'true' ] ,
7677 [ 'cleanup' , 'true' ] ,
78+ [ 'keep-state' , 'false' ]
7779 ] ) ,
7880 [
7981 'create' ,
@@ -92,6 +94,7 @@ describe('getCreateArgs', () => {
9294 [ 'driver-opts' , 'image=moby/buildkit:master\nnetwork=host' ] ,
9395 [ 'cache-binary' , 'true' ] ,
9496 [ 'cleanup' , 'true' ] ,
97+ [ 'keep-state' , 'false' ]
9598 ] ) ,
9699 [
97100 'create' ,
@@ -112,6 +115,7 @@ describe('getCreateArgs', () => {
112115 [ 'use' , 'true' ] ,
113116 [ 'cache-binary' , 'true' ] ,
114117 [ 'cleanup' , 'true' ] ,
118+ [ 'keep-state' , 'false' ]
115119 ] ) ,
116120 [
117121 'create' ,
@@ -132,6 +136,7 @@ describe('getCreateArgs', () => {
132136 [ 'use' , 'true' ] ,
133137 [ 'cache-binary' , 'true' ] ,
134138 [ 'cleanup' , 'true' ] ,
139+ [ 'keep-state' , 'false' ]
135140 ] ) ,
136141 [
137142 'create' ,
@@ -151,6 +156,7 @@ describe('getCreateArgs', () => {
151156 [ 'driver-opts' , `"env.no_proxy=localhost,127.0.0.1,.mydomain"` ] ,
152157 [ 'cache-binary' , 'true' ] ,
153158 [ 'cleanup' , 'true' ] ,
159+ [ 'keep-state' , 'false' ] ,
154160 ] ) ,
155161 [
156162 'create' ,
@@ -169,6 +175,7 @@ describe('getCreateArgs', () => {
169175 [ 'platforms' , 'linux/amd64\n"linux/arm64,linux/arm/v7"' ] ,
170176 [ 'cache-binary' , 'true' ] ,
171177 [ 'cleanup' , 'true' ] ,
178+ [ 'keep-state' , 'false' ] ,
172179 ] ) ,
173180 [
174181 'create' ,
@@ -187,6 +194,7 @@ describe('getCreateArgs', () => {
187194 [ 'driver' , 'unknown' ] ,
188195 [ 'cache-binary' , 'true' ] ,
189196 [ 'cleanup' , 'true' ] ,
197+ [ 'keep-state' , 'false' ] ,
190198 ] ) ,
191199 [
192200 'create' ,
@@ -203,6 +211,7 @@ describe('getCreateArgs', () => {
203211 [ 'buildkitd-config' , path . join ( fixturesDir , 'buildkitd.toml' ) ] ,
204212 [ 'cache-binary' , 'true' ] ,
205213 [ 'cleanup' , 'true' ] ,
214+ [ 'keep-state' , 'false' ] ,
206215 ] ) ,
207216 [
208217 'create' ,
@@ -221,6 +230,7 @@ describe('getCreateArgs', () => {
221230 [ 'buildkitd-config-inline' , 'debug = true' ] ,
222231 [ 'cache-binary' , 'true' ] ,
223232 [ 'cleanup' , 'true' ] ,
233+ [ 'keep-state' , 'false' ] ,
224234 ] ) ,
225235 [
226236 'create' ,
@@ -240,14 +250,53 @@ describe('getCreateArgs', () => {
240250 [ 'buildkitd-flags' , '--allow-insecure-entitlement network.host' ] ,
241251 [ 'cache-binary' , 'true' ] ,
242252 [ 'cleanup' , 'true' ] ,
253+ [ 'keep-state' , 'false' ] ,
243254 ] ) ,
244255 [
245256 'create' ,
246257 '--name' , 'builder-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' ,
247258 '--driver' , 'cloud' ,
248259 '--buildkitd-flags' , '--allow-insecure-entitlement network.host' ,
249260 ]
250- ]
261+ ] ,
262+ [
263+ 11 ,
264+ 'v0.10.3' ,
265+ new Map < string , string > ( [
266+ [ 'install' , 'false' ] ,
267+ [ 'use' , 'true' ] ,
268+ [ 'cleanup' , 'true' ] ,
269+ [ 'cache-binary' , 'true' ] ,
270+ [ 'keep-state' , 'false' ] ,
271+ [ 'name' , 'test-builder-name' ] ,
272+ ] ) ,
273+ [
274+ 'create' ,
275+ '--name' , 'test-builder-name' ,
276+ '--driver' , 'docker-container' ,
277+ '--buildkitd-flags' , '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host' ,
278+ '--use'
279+ ]
280+ ] ,
281+ [
282+ 12 ,
283+ 'v0.10.3' ,
284+ new Map < string , string > ( [
285+ [ 'install' , 'false' ] ,
286+ [ 'use' , 'true' ] ,
287+ [ 'cleanup' , 'true' ] ,
288+ [ 'cache-binary' , 'true' ] ,
289+ [ 'keep-state' , 'true' ] ,
290+ [ 'name' , 'test-builder-name' ] ,
291+ ] ) ,
292+ [
293+ 'create' ,
294+ '--name' , 'test-builder-name' ,
295+ '--driver' , 'docker-container' ,
296+ '--buildkitd-flags' , '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host' ,
297+ '--use' ,
298+ ]
299+ ] ,
251300 ] ) (
252301 '[%d] given buildx %s and %p as inputs, returns %p' ,
253302 async ( num : number , buildxVersion : string , inputs : Map < string , string > , expected : Array < string > ) => {
@@ -285,6 +334,7 @@ describe('getAppendArgs', () => {
285334 [ 'use' , 'true' ] ,
286335 [ 'cache-binary' , 'true' ] ,
287336 [ 'cleanup' , 'true' ] ,
337+ [ 'keep-state' , 'false' ]
288338 ] ) ,
289339 {
290340 "name" : "aws_graviton2" ,
@@ -343,6 +393,7 @@ describe('getVersion', () => {
343393 [ 'use' , 'true' ] ,
344394 [ 'cache-binary' , 'true' ] ,
345395 [ 'cleanup' , 'true' ] ,
396+ [ 'keep-state' , 'false' ]
346397 ] ) ,
347398 ''
348399 ] ,
@@ -354,7 +405,8 @@ describe('getVersion', () => {
354405 [ 'install' , 'false' ] ,
355406 [ 'use' , 'true' ] ,
356407 [ 'cache-binary' , 'true' ] ,
357- [ 'cleanup' , 'true' ]
408+ [ 'cleanup' , 'true' ] ,
409+ [ 'keep-state' , 'false' ]
358410 ] ) ,
359411 'latest'
360412 ] ,
@@ -366,7 +418,8 @@ describe('getVersion', () => {
366418 [ 'install' , 'false' ] ,
367419 [ 'use' , 'true' ] ,
368420 [ 'cache-binary' , 'true' ] ,
369- [ 'cleanup' , 'true' ]
421+ [ 'cleanup' , 'true' ] ,
422+ [ 'keep-state' , 'false' ]
370423 ] ) ,
371424 'edge'
372425 ] ,
@@ -378,7 +431,8 @@ describe('getVersion', () => {
378431 [ 'install' , 'false' ] ,
379432 [ 'use' , 'true' ] ,
380433 [ 'cache-binary' , 'true' ] ,
381- [ 'cleanup' , 'true' ]
434+ [ 'cleanup' , 'true' ] ,
435+ [ 'keep-state' , 'false' ]
382436 ] ) ,
383437 'v0.19.2'
384438 ] ,
@@ -391,7 +445,8 @@ describe('getVersion', () => {
391445 [ 'install' , 'false' ] ,
392446 [ 'use' , 'true' ] ,
393447 [ 'cache-binary' , 'true' ] ,
394- [ 'cleanup' , 'true' ]
448+ [ 'cleanup' , 'true' ] ,
449+ [ 'keep-state' , 'false' ]
395450 ] ) ,
396451 'cloud:latest'
397452 ] ,
@@ -404,7 +459,8 @@ describe('getVersion', () => {
404459 [ 'install' , 'false' ] ,
405460 [ 'use' , 'true' ] ,
406461 [ 'cache-binary' , 'true' ] ,
407- [ 'cleanup' , 'true' ]
462+ [ 'cleanup' , 'true' ] ,
463+ [ 'keep-state' , 'false' ]
408464 ] ) ,
409465 'cloud:edge'
410466 ] ,
@@ -417,6 +473,7 @@ describe('getVersion', () => {
417473 [ 'use' , 'true' ] ,
418474 [ 'cache-binary' , 'true' ] ,
419475 [ 'cleanup' , 'true' ] ,
476+ [ 'keep-state' , 'false' ]
420477 ] ) ,
421478 'cloud:latest'
422479 ] ,
@@ -430,6 +487,7 @@ describe('getVersion', () => {
430487 [ 'use' , 'true' ] ,
431488 [ 'cache-binary' , 'true' ] ,
432489 [ 'cleanup' , 'true' ] ,
490+ [ 'keep-state' , 'false' ]
433491 ] ) ,
434492 'cloud:v0.11.2-desktop.2'
435493 ] ,
@@ -442,6 +500,7 @@ describe('getVersion', () => {
442500 [ 'use' , 'true' ] ,
443501 [ 'cache-binary' , 'true' ] ,
444502 [ 'cleanup' , 'true' ] ,
503+ [ 'keep-state' , 'false' ]
445504 ] ) ,
446505 'cloud:v0.11.2-desktop.2'
447506 ] ,
0 commit comments