| ... | ... |
@@ -1652,3 +1652,29 @@ func TestMultipleVolumesFrom(t *testing.T) {
|
| 1652 | 1652 |
t.Fail() |
| 1653 | 1653 |
} |
| 1654 | 1654 |
} |
| 1655 |
+ |
|
| 1656 |
+func TestRestartGhost(t *testing.T) {
|
|
| 1657 |
+ runtime := mkRuntime(t) |
|
| 1658 |
+ defer nuke(runtime) |
|
| 1659 |
+ |
|
| 1660 |
+ container, err := runtime.Create(&Config{
|
|
| 1661 |
+ Image: GetTestImage(runtime).ID, |
|
| 1662 |
+ Cmd: []string{"sh", "-c", "echo -n bar > /test/foo"},
|
|
| 1663 |
+ Volumes: map[string]struct{}{"/test": {}},
|
|
| 1664 |
+ }, |
|
| 1665 |
+ ) |
|
| 1666 |
+ |
|
| 1667 |
+ if err != nil {
|
|
| 1668 |
+ t.Fatal(err) |
|
| 1669 |
+ } |
|
| 1670 |
+ if err := container.Kill(); err != nil {
|
|
| 1671 |
+ t.Fatal(err) |
|
| 1672 |
+ } |
|
| 1673 |
+ |
|
| 1674 |
+ container.State.Ghost = true |
|
| 1675 |
+ _, err = container.Output() |
|
| 1676 |
+ |
|
| 1677 |
+ if err != nil {
|
|
| 1678 |
+ t.Fatal(err) |
|
| 1679 |
+ } |
|
| 1680 |
+} |
|
| 1655 | 1681 |
\ No newline at end of file |