From 4cbb6ce13bf93df2a9e251dfa87fbce9952ab8a6 Mon Sep 17 00:00:00 2001 From: Paul Nasrat Date: Sat, 26 Oct 2013 09:51:56 -0400 Subject: [PATCH] Introduce failing test case for #2089 --- container_test.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/container_test.go b/container_test.go index 50942c02d8..e863b9d84c 100644 --- a/container_test.go +++ b/container_test.go @@ -1652,3 +1652,29 @@ func TestMultipleVolumesFrom(t *testing.T) { t.Fail() } } + +func TestRestartGhost(t *testing.T) { + runtime := mkRuntime(t) + defer nuke(runtime) + + container, err := runtime.Create(&Config{ + Image: GetTestImage(runtime).ID, + Cmd: []string{"sh", "-c", "echo -n bar > /test/foo"}, + Volumes: map[string]struct{}{"/test": {}}, + }, + ) + + if err != nil { + t.Fatal(err) + } + if err := container.Kill(); err != nil { + t.Fatal(err) + } + + container.State.Ghost = true + _, err = container.Output() + + if err != nil { + t.Fatal(err) + } +} \ No newline at end of file