summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcdoern <cbdoer23@g.holycross.edu>2022-04-28 22:37:11 -0400
committerMatthew Heon <matthew.heon@pm.me>2022-05-05 16:02:00 -0400
commita8b55a3b9f8f2395d0d8ac3a4112fb3ff30da630 (patch)
tree9278e03278b954bef7e71a80bd38acbecba09e1e /test
parentb2025c64f43e74c84fb928f07df7bab3f776fe2d (diff)
downloadpodman-a8b55a3b9f8f2395d0d8ac3a4112fb3ff30da630.tar.gz
podman-a8b55a3b9f8f2395d0d8ac3a4112fb3ff30da630.tar.bz2
podman-a8b55a3b9f8f2395d0d8ac3a4112fb3ff30da630.zip
pass networks to container clone
since the network config is a string map, json.unmarshal does not recognize the config and spec as the same entity, need to map this option manually resolves #13713 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
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())
+
+ })
})