summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-07-19 02:22:28 +0200
committerGitHub <noreply@github.com>2019-07-19 02:22:28 +0200
commitb59abdc1b1cf72d86d3fe6bb76ba646870c86ed6 (patch)
tree077b0c03cbc511267dd2d6401952178a70ec3296 /test/e2e
parentb98e015527d5b1981307d36c40a42ca1531b583c (diff)
parent3f721f8b17780931a75f9e072e4d32bf9a49e976 (diff)
downloadpodman-b59abdc1b1cf72d86d3fe6bb76ba646870c86ed6.tar.gz
podman-b59abdc1b1cf72d86d3fe6bb76ba646870c86ed6.tar.bz2
podman-b59abdc1b1cf72d86d3fe6bb76ba646870c86ed6.zip
Merge pull request #3579 from QiWang19/dns_net
fix --dns and --network conflict
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_dns_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/e2e/run_dns_test.go b/test/e2e/run_dns_test.go
index f1196ff38..081fab3fd 100644
--- a/test/e2e/run_dns_test.go
+++ b/test/e2e/run_dns_test.go
@@ -94,4 +94,22 @@ var _ = Describe("Podman run dns", func() {
Expect(session.ExitCode()).To(Equal(0))
Expect(session.LineInOutputContains("foobar")).To(BeTrue())
})
+
+ It("podman run mutually excludes --dns* and --network", func() {
+ session := podmanTest.Podman([]string{"run", "--dns=1.2.3.4", "--network", "container:ALPINE", ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+
+ session = podmanTest.Podman([]string{"run", "--dns-opt=1.2.3.4", "--network", "container:ALPINE", ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+
+ session = podmanTest.Podman([]string{"run", "--dns-search=foobar.com", "--network", "none", ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+
+ session = podmanTest.Podman([]string{"run", "--dns=1.2.3.4", "--network", "host", ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ })
})