summaryrefslogtreecommitdiff
path: root/test/e2e/network_create_test.go
diff options
context:
space:
mode:
authorLokesh Mandvekar <lsm5@fedoraproject.org>2022-02-11 13:34:18 -0500
committerLokesh Mandvekar <lsm5@fedoraproject.org>2022-02-11 13:34:28 -0500
commit6f9f78f7f2395919f7f9a3a74f002119733e30e9 (patch)
tree7d93a203f3683b442ed3f245f68258bad169a023 /test/e2e/network_create_test.go
parent564404b4fa7eea5d93756627ce98ca68fd19a72b (diff)
downloadpodman-6f9f78f7f2395919f7f9a3a74f002119733e30e9.tar.gz
podman-6f9f78f7f2395919f7f9a3a74f002119733e30e9.tar.bz2
podman-6f9f78f7f2395919f7f9a3a74f002119733e30e9.zip
enable netavark specific tests
These are copies of the CNI tests with modifications wherever neccessary. Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
Diffstat (limited to 'test/e2e/network_create_test.go')
-rw-r--r--test/e2e/network_create_test.go22
1 files changed, 20 insertions, 2 deletions
diff --git a/test/e2e/network_create_test.go b/test/e2e/network_create_test.go
index 7589adaab..395759ee6 100644
--- a/test/e2e/network_create_test.go
+++ b/test/e2e/network_create_test.go
@@ -330,8 +330,8 @@ var _ = Describe("Podman network create", func() {
Expect(nc).To(ExitWithError())
})
- It("podman network create with internal should not have dnsname", func() {
- SkipUntilAardvark(podmanTest)
+ It("podman CNI network create with internal should not have dnsname", func() {
+ SkipIfNetavark(podmanTest)
net := "internal-test" + stringid.GenerateNonCryptoID()
nc := podmanTest.Podman([]string{"network", "create", "--internal", net})
nc.WaitWithDefaultTimeout()
@@ -348,6 +348,24 @@ var _ = Describe("Podman network create", func() {
Expect(nc.OutputToString()).ToNot(ContainSubstring("dnsname"))
})
+ It("podman Netavark network create with internal should have dnsname", func() {
+ SkipIfCNI(podmanTest)
+ net := "internal-test" + stringid.GenerateNonCryptoID()
+ nc := podmanTest.Podman([]string{"network", "create", "--internal", net})
+ nc.WaitWithDefaultTimeout()
+ defer podmanTest.removeNetwork(net)
+ Expect(nc).Should(Exit(0))
+ // 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(BeEmpty())
+ }
+ nc = podmanTest.Podman([]string{"network", "inspect", net})
+ nc.WaitWithDefaultTimeout()
+ Expect(nc).Should(Exit(0))
+ Expect(nc.OutputToString()).To(ContainSubstring(`"dns_enabled": true`))
+ })
+
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})