diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/buildah-bud/apply-podman-deltas | 10 | ||||
-rw-r--r-- | test/e2e/create_test.go | 9 | ||||
-rw-r--r-- | test/e2e/pod_create_test.go | 8 | ||||
-rw-r--r-- | test/e2e/run_networking_test.go | 13 | ||||
-rw-r--r-- | test/system/010-images.bats | 11 | ||||
-rw-r--r-- | test/system/040-ps.bats | 4 | ||||
-rw-r--r-- | test/system/200-pod.bats | 2 |
7 files changed, 41 insertions, 16 deletions
diff --git a/test/buildah-bud/apply-podman-deltas b/test/buildah-bud/apply-podman-deltas index cb8357e89..b30c95d59 100755 --- a/test/buildah-bud/apply-podman-deltas +++ b/test/buildah-bud/apply-podman-deltas @@ -136,10 +136,6 @@ errmsg "no such file or directory" \ ############################################################################### # BEGIN tests that don't make sense under podman due to fundamental differences - -skip "N/A under podman" \ - "bud-flags-order-verification" - # TODO # Some of the podman tests in CI expects exit code 125, which might not be true # since exit code from runtime is relayed as it is without any modification both @@ -152,6 +148,9 @@ skip "N/A under podman" \ skip "podman CI expects all exit code to be 125 this test has anomaly behaviour" \ "bud with --add-host" +skip "podman CI expects all exit code to be 125 this test has anomaly behaviour" \ + "bud - invalid runtime flags test" + skip "does not work under podman" \ "bud without any arguments should succeed" @@ -181,6 +180,9 @@ skip "buildah runs with --cgroup-manager=cgroupfs, podman with systemd" \ ############################################################################### # BEGIN tests which are skipped because they make no sense under podman-remote +skip_if_remote "--runtime-flags does not work with podman-remote" \ + "bud - invalid runtime flags test" + skip_if_remote "--target does not work with podman-remote" \ "bud-target" diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go index 4c3b5604a..11f8b5abf 100644 --- a/test/e2e/create_test.go +++ b/test/e2e/create_test.go @@ -118,7 +118,7 @@ var _ = Describe("Podman create", func() { result := podmanTest.Podman([]string{"inspect", "entrypoint_test", "--format", "{{.Config.Entrypoint}}"}) result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) - Expect(result.OutputToString()).To(Equal("/bin/foobar")) + Expect(result.OutputToString()).To(Equal("[/bin/foobar]")) }) It("podman create --entrypoint \"\"", func() { @@ -130,7 +130,7 @@ var _ = Describe("Podman create", func() { result := podmanTest.Podman([]string{"inspect", session.OutputToString(), "--format", "{{.Config.Entrypoint}}"}) result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) - Expect(result.OutputToString()).To(Equal("")) + Expect(result.OutputToString()).To(Equal("[]")) }) It("podman create --entrypoint json", func() { @@ -143,7 +143,7 @@ var _ = Describe("Podman create", func() { result := podmanTest.Podman([]string{"inspect", "entrypoint_json", "--format", "{{.Config.Entrypoint}}"}) result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) - Expect(result.OutputToString()).To(Equal("/bin/foo -c")) + Expect(result.OutputToString()).To(Equal("[/bin/foo -c]")) }) It("podman create --mount flag with multiple mounts", func() { @@ -281,7 +281,8 @@ var _ = Describe("Podman create", func() { Expect(ctrJSON).To(HaveLen(1)) Expect(ctrJSON[0].Config.Cmd).To(HaveLen(1)) Expect(ctrJSON[0].Config.Cmd[0]).To(Equal("redis-server")) - Expect(ctrJSON[0].Config.Entrypoint).To(Equal("docker-entrypoint.sh")) + Expect(ctrJSON[0].Config.Entrypoint).To(HaveLen(1)) + Expect(ctrJSON[0].Config.Entrypoint[0]).To(Equal("docker-entrypoint.sh")) }) It("podman create --pull", func() { diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go index 8def80213..dc43ce6fd 100644 --- a/test/e2e/pod_create_test.go +++ b/test/e2e/pod_create_test.go @@ -368,7 +368,7 @@ var _ = Describe("Podman pod create", func() { check1 := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Config.Entrypoint}}", data.Containers[0].ID}) check1.WaitWithDefaultTimeout() Expect(check1).Should(Exit(0)) - Expect(check1.OutputToString()).To(Equal("/catatonit -P")) + Expect(check1.OutputToString()).To(Equal("[/catatonit -P]")) // check the Path and Args check2 := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Path}}:{{.Args}}", data.Containers[0].ID}) @@ -391,7 +391,7 @@ var _ = Describe("Podman pod create", func() { check1 := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Config.Entrypoint}}", data.Containers[0].ID}) check1.WaitWithDefaultTimeout() Expect(check1).Should(Exit(0)) - Expect(check1.OutputToString()).To(Equal("/pause1")) + Expect(check1.OutputToString()).To(Equal("[/pause1]")) // check the Path and Args check2 := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Path}}:{{.Args}}", data.Containers[0].ID}) @@ -418,7 +418,7 @@ entrypoint ["/fromimage"] check1 := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Config.Entrypoint}}", data.Containers[0].ID}) check1.WaitWithDefaultTimeout() Expect(check1).Should(Exit(0)) - Expect(check1.OutputToString()).To(Equal("/fromimage")) + Expect(check1.OutputToString()).To(Equal("[/fromimage]")) // check the Path and Args check2 := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Path}}:{{.Args}}", data.Containers[0].ID}) @@ -445,7 +445,7 @@ entrypoint ["/fromimage"] check1 := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Config.Entrypoint}}", data.Containers[0].ID}) check1.WaitWithDefaultTimeout() Expect(check1).Should(Exit(0)) - Expect(check1.OutputToString()).To(Equal("/fromcommand")) + Expect(check1.OutputToString()).To(Equal("[/fromcommand]")) // check the Path and Args check2 := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Path}}:{{.Args}}", data.Containers[0].ID}) diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go index faf4db753..696668e52 100644 --- a/test/e2e/run_networking_test.go +++ b/test/e2e/run_networking_test.go @@ -1119,4 +1119,17 @@ EXPOSE 2004-2005/tcp`, ALPINE) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) }) + + It("podman run with ipam none driver", func() { + net := "ipam" + stringid.GenerateNonCryptoID() + session := podmanTest.Podman([]string{"network", "create", "--ipam-driver=none", net}) + session.WaitWithDefaultTimeout() + defer podmanTest.removeNetwork(net) + Expect(session).Should(Exit(0)) + + session = podmanTest.Podman([]string{"run", "--network", net, ALPINE, "ip", "addr", "show", "eth0"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + Expect(session.OutputToStringArray()).To(HaveLen(4), "output should only show link local address") + }) }) diff --git a/test/system/010-images.bats b/test/system/010-images.bats index 257508418..352c3aa95 100644 --- a/test/system/010-images.bats +++ b/test/system/010-images.bats @@ -312,4 +312,15 @@ Deleted: $pauseID" is "$output" "" } +@test "podman images --size" { + run_podman images + is "${lines[0]}" "REPOSITORY.*TAG.*IMAGE ID.*CREATED.*SIZE" + run_podman images --noheading --format "{{.Size}}" + is "$output" ".* MB" + run_podman images --size=false + is "${lines[0]}" "REPOSITORY.*TAG.*IMAGE ID.*CREATED" + run_podman images --noheading --format "{{.Size}}" --size=false + is "$output" "0 B" +} + # vim: filetype=sh diff --git a/test/system/040-ps.bats b/test/system/040-ps.bats index 8d0a405d2..6fc0b9b6e 100644 --- a/test/system/040-ps.bats +++ b/test/system/040-ps.bats @@ -99,9 +99,7 @@ EOF local t1=$SECONDS local delta_t=$((t1 - t0)) if [[ $delta_t -gt 10 ]]; then - # FIXME FIXME FIXME: when buildah issue 3544 gets fixed and vendored, - # change 'echo' to 'die' - echo "podman build did not get killed within 10 seconds (actual time: $delta_t seconds)" + die "podman build did not get killed within 10 seconds (actual time: $delta_t seconds)" fi run_podman ps -a diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats index f5fe41924..e6f4ecdbc 100644 --- a/test/system/200-pod.bats +++ b/test/system/200-pod.bats @@ -234,7 +234,7 @@ EOF local infra_cid="$output" # confirm that entrypoint is what we set run_podman container inspect --format '{{.Config.Entrypoint}}' $infra_cid - is "$output" "$infra_command" "infra-command took effect" + is "$output" "[$infra_command]" "infra-command took effect" # confirm that infra container name is set run_podman container inspect --format '{{.Name}}' $infra_cid is "$output" "$infra_name" "infra-name took effect" |