summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-16 17:17:08 -0400
committerGitHub <noreply@github.com>2021-09-16 17:17:08 -0400
commit6cf13c3dbf05a263c08c3f1b1a10cfed722e5929 (patch)
tree3f235e0cfcf8ffb9082855eb03d1828f71940047 /test/e2e
parent0acf540304b7d2f57357522e4fb47914b0b31a70 (diff)
parent5c7935057c34cbdb27be3a584d35bff3fcd81202 (diff)
downloadpodman-6cf13c3dbf05a263c08c3f1b1a10cfed722e5929.tar.gz
podman-6cf13c3dbf05a263c08c3f1b1a10cfed722e5929.tar.bz2
podman-6cf13c3dbf05a263c08c3f1b1a10cfed722e5929.zip
Merge pull request #11602 from Luap99/netname
Do not allow network modes to be used as network names
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/network_create_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/e2e/network_create_test.go b/test/e2e/network_create_test.go
index d419a701d..ae9f112b5 100644
--- a/test/e2e/network_create_test.go
+++ b/test/e2e/network_create_test.go
@@ -343,4 +343,13 @@ var _ = Describe("Podman network create", func() {
Expect(nc.OutputToString()).ToNot(ContainSubstring("dnsname"))
})
+ It("podman network create with invalid name", func() {
+ for _, name := range []string{"none", "host", "bridge", "private", "slirp4netns", "container", "ns"} {
+ nc := podmanTest.Podman([]string{"network", "create", name})
+ nc.WaitWithDefaultTimeout()
+ Expect(nc).To(Exit(125))
+ Expect(nc.ErrorToString()).To(ContainSubstring("cannot create network with name %q because it conflicts with a valid network mode", name))
+ }
+ })
+
})