@@ -106,12 +106,12 @@ func TestContainerStart(t *testing.T) {
106106 t .Error (err )
107107 return
108108 }
109- container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewRootFS (id , image ))
109+ container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewSnapshot (id , image ))
110110 if err != nil {
111111 t .Error (err )
112112 return
113113 }
114- defer container .Delete (ctx , WithRootFSDeletion )
114+ defer container .Delete (ctx , WithSnapshotCleanup )
115115
116116 task , err := container .NewTask (ctx , Stdio )
117117 if err != nil {
@@ -178,12 +178,12 @@ func TestContainerOutput(t *testing.T) {
178178 t .Error (err )
179179 return
180180 }
181- container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewRootFS (id , image ))
181+ container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewSnapshot (id , image ))
182182 if err != nil {
183183 t .Error (err )
184184 return
185185 }
186- defer container .Delete (ctx , WithRootFSDeletion )
186+ defer container .Delete (ctx , WithSnapshotCleanup )
187187
188188 stdout := bytes .NewBuffer (nil )
189189 task , err := container .NewTask (ctx , NewIO (bytes .NewBuffer (nil ), stdout , bytes .NewBuffer (nil )))
@@ -251,12 +251,12 @@ func TestContainerExec(t *testing.T) {
251251 t .Error (err )
252252 return
253253 }
254- container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewRootFS (id , image ))
254+ container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewSnapshot (id , image ))
255255 if err != nil {
256256 t .Error (err )
257257 return
258258 }
259- defer container .Delete (ctx , WithRootFSDeletion )
259+ defer container .Delete (ctx , WithSnapshotCleanup )
260260
261261 task , err := container .NewTask (ctx , empty ())
262262 if err != nil {
@@ -348,12 +348,12 @@ func TestContainerPids(t *testing.T) {
348348 t .Error (err )
349349 return
350350 }
351- container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewRootFS (id , image ))
351+ container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewSnapshot (id , image ))
352352 if err != nil {
353353 t .Error (err )
354354 return
355355 }
356- defer container .Delete (ctx , WithRootFSDeletion )
356+ defer container .Delete (ctx , WithSnapshotCleanup )
357357
358358 task , err := container .NewTask (ctx , empty ())
359359 if err != nil {
@@ -427,12 +427,12 @@ func TestContainerCloseIO(t *testing.T) {
427427 t .Error (err )
428428 return
429429 }
430- container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewRootFS (id , image ))
430+ container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewSnapshot (id , image ))
431431 if err != nil {
432432 t .Error (err )
433433 return
434434 }
435- defer container .Delete (ctx , WithRootFSDeletion )
435+ defer container .Delete (ctx , WithSnapshotCleanup )
436436
437437 const expected = "hello" + newLine
438438 stdout := bytes .NewBuffer (nil )
@@ -525,12 +525,12 @@ func TestContainerAttach(t *testing.T) {
525525 t .Error (err )
526526 return
527527 }
528- container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewRootFS (id , image ))
528+ container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewSnapshot (id , image ))
529529 if err != nil {
530530 t .Error (err )
531531 return
532532 }
533- defer container .Delete (ctx , WithRootFSDeletion )
533+ defer container .Delete (ctx , WithSnapshotCleanup )
534534
535535 expected := "hello" + newLine
536536 stdout := bytes .NewBuffer (nil )
@@ -651,12 +651,12 @@ func TestDeleteRunningContainer(t *testing.T) {
651651 t .Error (err )
652652 return
653653 }
654- container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewRootFS (id , image ))
654+ container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewSnapshot (id , image ))
655655 if err != nil {
656656 t .Error (err )
657657 return
658658 }
659- defer container .Delete (ctx , WithRootFSDeletion )
659+ defer container .Delete (ctx , WithSnapshotCleanup )
660660
661661 task , err := container .NewTask (ctx , empty ())
662662 if err != nil {
@@ -679,7 +679,7 @@ func TestDeleteRunningContainer(t *testing.T) {
679679 return
680680 }
681681
682- err = container .Delete (ctx , WithRootFSDeletion )
682+ err = container .Delete (ctx , WithSnapshotCleanup )
683683 if err == nil {
684684 t .Error ("delete did not error with running task" )
685685 }
@@ -720,7 +720,7 @@ func TestContainerKill(t *testing.T) {
720720 t .Error (err )
721721 return
722722 }
723- container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewRootFS (id , image ))
723+ container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewSnapshot (id , image ))
724724 if err != nil {
725725 t .Error (err )
726726 return
@@ -790,12 +790,12 @@ func TestContainerNoBinaryExists(t *testing.T) {
790790 t .Error (err )
791791 return
792792 }
793- container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewRootFS (id , image ))
793+ container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewSnapshot (id , image ))
794794 if err != nil {
795795 t .Error (err )
796796 return
797797 }
798- defer container .Delete (ctx , WithRootFSDeletion )
798+ defer container .Delete (ctx , WithSnapshotCleanup )
799799
800800 task , err := container .NewTask (ctx , Stdio )
801801 switch runtime .GOOS {
@@ -842,12 +842,12 @@ func TestContainerExecNoBinaryExists(t *testing.T) {
842842 t .Error (err )
843843 return
844844 }
845- container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewRootFS (id , image ))
845+ container , err := client .NewContainer (ctx , id , WithSpec (spec ), withNewSnapshot (id , image ))
846846 if err != nil {
847847 t .Error (err )
848848 return
849849 }
850- defer container .Delete (ctx , WithRootFSDeletion )
850+ defer container .Delete (ctx , WithSnapshotCleanup )
851851
852852 task , err := container .NewTask (ctx , empty ())
853853 if err != nil {
0 commit comments