summaryrefslogtreecommitdiff
path: root/test/e2e/network_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-01-18 15:42:06 -0500
committerGitHub <noreply@github.com>2022-01-18 15:42:06 -0500
commit094b11cbcb528a7d120c31402a1bcd9c82d84938 (patch)
tree3ce00f13dda775d979a093658f26cea4122646d9 /test/e2e/network_test.go
parent62212dbf490d736ad06523a92345a480e4972dab (diff)
parentc0e07234631cfcea1d6724c05606964a4d833f39 (diff)
downloadpodman-094b11cbcb528a7d120c31402a1bcd9c82d84938.tar.gz
podman-094b11cbcb528a7d120c31402a1bcd9c82d84938.tar.bz2
podman-094b11cbcb528a7d120c31402a1bcd9c82d84938.zip
Merge pull request #12908 from Luap99/network-conf-dir
rename --cni-config-dir to --network-config-dir
Diffstat (limited to 'test/e2e/network_test.go')
-rw-r--r--test/e2e/network_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go
index 877ad37b8..70793fc32 100644
--- a/test/e2e/network_test.go
+++ b/test/e2e/network_test.go
@@ -38,6 +38,26 @@ var _ = Describe("Podman network", func() {
})
+ It("podman --cni-config-dir backwards compat", func() {
+ SkipIfRemote("--cni-config-dir only works locally")
+ netDir, err := CreateTempDirInTempDir()
+ Expect(err).ToNot(HaveOccurred())
+ defer os.RemoveAll(netDir)
+ session := podmanTest.Podman([]string{"--cni-config-dir", netDir, "network", "ls", "--noheading"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ // default network always exists
+ Expect(session.OutputToStringArray()).To(HaveLen(1))
+
+ // check that the only file in the directory is the network lockfile
+ dir, err := os.Open(netDir)
+ Expect(err).ToNot(HaveOccurred())
+ names, err := dir.Readdirnames(5)
+ Expect(err).ToNot(HaveOccurred())
+ Expect(names).To(HaveLen(1))
+ Expect(names[0]).To(Or(Equal("netavark.lock"), Equal("cni.lock")))
+ })
+
It("podman network list", func() {
name, path := generateNetworkConfig(podmanTest)
defer removeConf(path)