|
@@ -646,13 +646,21 @@ func TestPostContainersCreate(t *testing.T) {
|
|
|
t.Fatal(err)
|
|
|
}
|
|
|
|
|
|
- if _, err := os.Stat(path.Join(container.rwPath(), "test")); err != nil {
|
|
|
+ if err := container.EnsureMounted(); err != nil {
|
|
|
+ t.Fatalf("Unable to mount container: %s", err)
|
|
|
+ }
|
|
|
+
|
|
|
+ if _, err := os.Stat(path.Join(container.RootfsPath(), "test")); err != nil {
|
|
|
if os.IsNotExist(err) {
|
|
|
utils.Debugf("Err: %s", err)
|
|
|
t.Fatalf("The test file has not been created")
|
|
|
}
|
|
|
t.Fatal(err)
|
|
|
}
|
|
|
+
|
|
|
+ if err := container.Unmount(); err != nil {
|
|
|
+ t.Fatalf("Unable to unmount container: %s", err)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
func TestPostContainersKill(t *testing.T) {
|