summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-22 06:24:52 -0400
committerGitHub <noreply@github.com>2022-04-22 06:24:52 -0400
commit26a51b29009e6250f2b52fc7c13fb1b65208754e (patch)
tree5fd96d95e5a134783d264b05db8efa86bdd59267 /test
parent67a1b520e38d9860345bdece2026c4f7a95cb8fd (diff)
parent5375401960cf0a9b716bb18eacdb07ffbb0e6da1 (diff)
downloadpodman-26a51b29009e6250f2b52fc7c13fb1b65208754e.tar.gz
podman-26a51b29009e6250f2b52fc7c13fb1b65208754e.tar.bz2
podman-26a51b29009e6250f2b52fc7c13fb1b65208754e.zip
Merge pull request #13943 from cdoern/clone
podman container clone -f
Diffstat (limited to 'test')
-rw-r--r--test/e2e/container_clone_test.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/e2e/container_clone_test.go b/test/e2e/container_clone_test.go
index 1d5944d1a..1ff4b3b5f 100644
--- a/test/e2e/container_clone_test.go
+++ b/test/e2e/container_clone_test.go
@@ -235,4 +235,36 @@ var _ = Describe("Podman container clone", func() {
Expect(ctrInspect.InspectContainerToJSON()[0].HostConfig.NetworkMode).Should(ContainSubstring("container:"))
})
+
+ It("podman container clone --destroy --force test", func() {
+ create := podmanTest.Podman([]string{"create", ALPINE})
+ create.WaitWithDefaultTimeout()
+ Expect(create).To(Exit(0))
+ clone := podmanTest.Podman([]string{"container", "clone", "--destroy", create.OutputToString()})
+ clone.WaitWithDefaultTimeout()
+ Expect(clone).To(Exit(0))
+
+ inspect := podmanTest.Podman([]string{"inspect", create.OutputToString()})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect).ToNot(Exit(0))
+
+ run := podmanTest.Podman([]string{"run", "-dt", ALPINE})
+ run.WaitWithDefaultTimeout()
+ Expect(run).To(Exit(0))
+ clone = podmanTest.Podman([]string{"container", "clone", "--destroy", "-f", run.OutputToString()})
+ clone.WaitWithDefaultTimeout()
+ Expect(clone).To(Exit(0))
+
+ inspect = podmanTest.Podman([]string{"inspect", run.OutputToString()})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect).ToNot(Exit(0))
+
+ run = podmanTest.Podman([]string{"run", "-dt", ALPINE})
+ run.WaitWithDefaultTimeout()
+ Expect(run).To(Exit(0))
+ clone = podmanTest.Podman([]string{"container", "clone", "-f", run.OutputToString()})
+ clone.WaitWithDefaultTimeout()
+ Expect(clone).ToNot(Exit(0))
+
+ })
})