mirror of
https://github.com/moby/moby.git
synced 2025-12-24 13:21:20 +03:00
Make sure integration-cli test clean up
Common patterns: - Multiple images were built with same name but only one cleanup. - Containers were deleted after images. - Images not removed after retagging. Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
This commit is contained in:
@@ -16,7 +16,7 @@ func TestImportDisplay(t *testing.T) {
|
||||
}
|
||||
defer server.Close()
|
||||
fileURL := fmt.Sprintf("%s/cirros.tar.gz", server.URL)
|
||||
importCmd := exec.Command(dockerBinary, "import", fileURL)
|
||||
importCmd := exec.Command(dockerBinary, "import", fileURL, "cirros")
|
||||
out, _, err := runCommandWithOutput(importCmd)
|
||||
if err != nil {
|
||||
t.Errorf("import failed with errors: %v, output: %q", err, out)
|
||||
@@ -26,5 +26,7 @@ func TestImportDisplay(t *testing.T) {
|
||||
t.Fatalf("display is messed up: %d '\\n' instead of 2", n)
|
||||
}
|
||||
|
||||
deleteImages("cirros")
|
||||
|
||||
logDone("import - cirros was imported and display is fine")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user