test: Do SynchronousDelete cleanup before testing ImageIsUnpacked
Simply delete the image will not clean up the snapshots. Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
This commit is contained in:
parent
ec661e8ceb
commit
19f7f3ccc4
@ -45,7 +45,8 @@ func TestImageIsUnpacked(t *testing.T) {
|
||||
defer client.Close()
|
||||
|
||||
// Cleanup
|
||||
err = client.ImageService().Delete(ctx, imageName)
|
||||
opts := []images.DeleteOpt{images.SynchronousDelete()}
|
||||
err = client.ImageService().Delete(ctx, imageName, opts...)
|
||||
if err != nil && !errdefs.IsNotFound(err) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user