aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2021-01-21 12:04:59 -0600
committerbaude <bbaude@redhat.com>2021-01-25 08:51:15 -0600
commit393a8f02612518e9715669d1cf2d7ceb101f5079 (patch)
treec862d7eb137315cd3efe3f961d8705d8f816d0da /test
parent6cef7c78dd5f8e2e8e1fe91bd2c7d1298f7e4df9 (diff)
downloadpodman-393a8f02612518e9715669d1cf2d7ceb101f5079.tar.gz
podman-393a8f02612518e9715669d1cf2d7ceb101f5079.tar.bz2
podman-393a8f02612518e9715669d1cf2d7ceb101f5079.zip
disable dnsname when --internal
when doing a network creation, the dnsname plugin should be disabled when the --internal bool is set. a warning is displayed if this happens and docs are updated. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/network_create_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/network_create_test.go b/test/e2e/network_create_test.go
index 73e18cbce..1bf2a2691 100644
--- a/test/e2e/network_create_test.go
+++ b/test/e2e/network_create_test.go
@@ -375,4 +375,21 @@ var _ = Describe("Podman network create", func() {
Expect(nc).To(ExitWithError())
})
+ It("podman network create with internal should not have dnsname", func() {
+ net := "internal-test" + stringid.GenerateNonCryptoID()
+ nc := podmanTest.Podman([]string{"network", "create", "--internal", net})
+ nc.WaitWithDefaultTimeout()
+ defer podmanTest.removeCNINetwork(net)
+ Expect(nc.ExitCode()).To(BeZero())
+ // Not performing this check on remote tests because it is a logrus error which does
+ // not come back via stderr on the remote client.
+ if !IsRemote() {
+ Expect(nc.ErrorToString()).To(ContainSubstring("dnsname and --internal networks are incompatible"))
+ }
+ nc = podmanTest.Podman([]string{"network", "inspect", net})
+ nc.WaitWithDefaultTimeout()
+ Expect(nc.ExitCode()).To(BeZero())
+ Expect(nc.OutputToString()).ToNot(ContainSubstring("dnsname"))
+ })
+
})