summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-05-05 05:51:19 -0400
committerGitHub <noreply@github.com>2022-05-05 05:51:19 -0400
commit7af4612d6b969329a78b4945c35a641449989a2d (patch)
tree1b4e70fa3cce85f9d0ab53ae0b3cd8fb97da0faf /test
parent97beca9e83ea5afee5f07249967cb1bdda2b9803 (diff)
parent1585b175dbf47e7ee0d5a26600aaec898ec5c26b (diff)
downloadpodman-7af4612d6b969329a78b4945c35a641449989a2d.tar.gz
podman-7af4612d6b969329a78b4945c35a641449989a2d.tar.bz2
podman-7af4612d6b969329a78b4945c35a641449989a2d.zip
Merge pull request #14059 from cdoern/clone
pass networks to container clone
Diffstat (limited to 'test')
-rw-r--r--test/e2e/container_clone_test.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/e2e/container_clone_test.go b/test/e2e/container_clone_test.go
index da9b511e0..94ccd6ffe 100644
--- a/test/e2e/container_clone_test.go
+++ b/test/e2e/container_clone_test.go
@@ -266,4 +266,30 @@ var _ = Describe("Podman container clone", func() {
Expect(clone).ToNot(Exit(0))
})
+
+ It("podman container clone network passing", func() {
+ networkCreate := podmanTest.Podman([]string{"network", "create", "testing123"})
+ networkCreate.WaitWithDefaultTimeout()
+ defer podmanTest.removeNetwork("testing123")
+ Expect(networkCreate).To(Exit(0))
+ run := podmanTest.Podman([]string{"run", "--network", "bridge", "-dt", ALPINE})
+ run.WaitWithDefaultTimeout()
+ Expect(run).To(Exit(0))
+
+ connect := podmanTest.Podman([]string{"network", "connect", "testing123", run.OutputToString()})
+ connect.WaitWithDefaultTimeout()
+ Expect(connect).To(Exit(0))
+
+ clone := podmanTest.Podman([]string{"container", "clone", run.OutputToString()})
+ clone.WaitWithDefaultTimeout()
+ Expect(clone).To(Exit(0))
+
+ inspect := podmanTest.Podman([]string{"inspect", clone.OutputToString()})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect).To(Exit(0))
+ Expect(inspect.InspectContainerToJSON()[0].NetworkSettings.Networks).To(HaveLen(2))
+ _, ok := inspect.InspectContainerToJSON()[0].NetworkSettings.Networks["testing123"]
+ Expect(ok).To(BeTrue())
+
+ })
})