Fix issue within TestDelete. The archive is now consumed by graph functions

Upstream-commit: 42ce68894a33a7d966f8dd767aee46dea6dbc346
Component: engine
This commit is contained in:
Guillaume J. Charmes
2013-06-18 17:22:32 -07:00
parent b0870dd8c5
commit 2d59f452fa

View File

@ -192,11 +192,19 @@ func TestDelete(t *testing.T) {
}
assertNImages(graph, t, 0)
archive, err = fakeTar()
if err != nil {
t.Fatal(err)
}
// Test 2 create (same name) / 1 delete
img1, err := graph.Create(archive, nil, "Testing", "", nil)
if err != nil {
t.Fatal(err)
}
archive, err = fakeTar()
if err != nil {
t.Fatal(err)
}
if _, err = graph.Create(archive, nil, "Testing", "", nil); err != nil {
t.Fatal(err)
}
@ -212,6 +220,10 @@ func TestDelete(t *testing.T) {
}
assertNImages(graph, t, 1)
archive, err = fakeTar()
if err != nil {
t.Fatal(err)
}
// Test delete twice (pull -> rm -> pull -> rm)
if err := graph.Register(archive, false, img1); err != nil {
t.Fatal(err)