summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-26 16:38:54 +0000
committerGitHub <noreply@github.com>2021-10-26 16:38:54 +0000
commit420ac5d13d0f9756a67ddc29032af41cca9a6d64 (patch)
treec9baccb3f73489a33004b12025a4955e711e2cad /test/e2e
parentb7639ab503a61c8e82eed84e795695bc1f2be0b2 (diff)
parentbf8fd943ef61941b7ffe10cd389615256b381e2f (diff)
downloadpodman-420ac5d13d0f9756a67ddc29032af41cca9a6d64.tar.gz
podman-420ac5d13d0f9756a67ddc29032af41cca9a6d64.tar.bz2
podman-420ac5d13d0f9756a67ddc29032af41cca9a6d64.zip
Merge pull request #12088 from adrianreber/2021-10-25-fix-label-ipc-host
Allow 'container restore' with '--ipc host'
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/checkpoint_test.go35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/e2e/checkpoint_test.go b/test/e2e/checkpoint_test.go
index 770a7c7bd..a8efe1ca9 100644
--- a/test/e2e/checkpoint_test.go
+++ b/test/e2e/checkpoint_test.go
@@ -1156,4 +1156,39 @@ var _ = Describe("Podman checkpoint", func() {
os.Remove(fileName)
})
}
+
+ It("podman checkpoint container with export (migration) and --ipc host", func() {
+ localRunString := getRunString([]string{"--rm", "--ipc", "host", ALPINE, "top"})
+ session := podmanTest.Podman(localRunString)
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))
+ cid := session.OutputToString()
+ fileName := "/tmp/checkpoint-" + cid + ".tar.gz"
+
+ result := podmanTest.Podman([]string{"container", "checkpoint", "-l", "-e", fileName})
+ result.WaitWithDefaultTimeout()
+
+ // As the container has been started with '--rm' it will be completely
+ // cleaned up after checkpointing.
+ Expect(result).Should(Exit(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
+ Expect(podmanTest.NumberOfContainers()).To(Equal(0))
+
+ result = podmanTest.Podman([]string{"container", "restore", "-i", fileName})
+ result.WaitWithDefaultTimeout()
+
+ Expect(result).Should(Exit(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))
+ Expect(podmanTest.GetContainerStatus()).To(ContainSubstring("Up"))
+
+ result = podmanTest.Podman([]string{"rm", "-t", "0", "-fa"})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
+ Expect(podmanTest.NumberOfContainers()).To(Equal(0))
+
+ // Remove exported checkpoint
+ os.Remove(fileName)
+ })
})