diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/buildah-bud/apply-podman-deltas | 4 | ||||
-rw-r--r-- | test/e2e/start_test.go | 1 | ||||
-rw-r--r-- | test/python/docker/__init__.py | 2 | ||||
-rw-r--r-- | test/python/docker/compat/test_containers.py | 9 | ||||
-rw-r--r-- | test/system/200-pod.bats | 17 | ||||
-rw-r--r-- | test/system/255-auto-update.bats | 2 |
6 files changed, 26 insertions, 9 deletions
diff --git a/test/buildah-bud/apply-podman-deltas b/test/buildah-bud/apply-podman-deltas index 0bf9f298d..41c84257f 100755 --- a/test/buildah-bud/apply-podman-deltas +++ b/test/buildah-bud/apply-podman-deltas @@ -155,6 +155,10 @@ skip "FIXME FIXME FIXME we'll figure these out later" \ skip "FIXME FIXME FIXME podman save/load has been fixed (but not yet used in Buildah CI)" \ "bud with --layers and --no-cache flags" +# see https://github.com/containers/podman/pull/10829 +skip "FIXME FIXME FIXME - requires updated CI images (#10829)" \ + "bud with --runtime and --runtime-flag" + ############################################################################### # BEGIN tests which are skipped due to actual podman bugs. diff --git a/test/e2e/start_test.go b/test/e2e/start_test.go index 7799055d9..073631ef7 100644 --- a/test/e2e/start_test.go +++ b/test/e2e/start_test.go @@ -65,7 +65,6 @@ var _ = Describe("Podman start", func() { }) It("podman start --rm --attach removed on failure", func() { - Skip("FIXME: #10935, race condition removing container") session := podmanTest.Podman([]string{"create", "--rm", ALPINE, "foo"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) diff --git a/test/python/docker/__init__.py b/test/python/docker/__init__.py index 59b7987f4..f75185192 100644 --- a/test/python/docker/__init__.py +++ b/test/python/docker/__init__.py @@ -27,7 +27,7 @@ class Podman(object): # No support for tmpfs (/tmp) or extfs (/var/tmp) # self.cmd.append("--storage-driver=overlay") - if os.getenv("DEBUG"): + if os.getenv("PODMAN_PYTHON_TEST_DEBUG"): self.cmd.append("--log-level=debug") self.cmd.append("--syslog=true") diff --git a/test/python/docker/compat/test_containers.py b/test/python/docker/compat/test_containers.py index 9fcdf49ea..1ad1e7f15 100644 --- a/test/python/docker/compat/test_containers.py +++ b/test/python/docker/compat/test_containers.py @@ -140,7 +140,7 @@ class TestContainers(unittest.TestCase): def test_remove_container_without_force(self): # Validate current container count - self.assertTrue(len(self.client.containers.list()), 1) + self.assertEqual(len(self.client.containers.list()), 1) # Remove running container should throw error top = self.client.containers.get(TestContainers.topContainerId) @@ -206,7 +206,6 @@ class TestContainers(unittest.TestCase): self.assertEqual(len(ctnrs), 1) def test_copy_to_container(self): - self.skipTest("FIXME: #10948 - test is broken") ctr: Optional[Container] = None try: test_file_content = b"Hello World!" @@ -230,11 +229,11 @@ class TestContainers(unittest.TestCase): ret, out = ctr.exec_run(["stat", "-c", "%u:%g", "/tmp/a.txt"]) self.assertEqual(ret, 0) - self.assertTrue(out.startswith(b'1042:1043'), "assert correct uid/gid") + self.assertEqual(out.rstrip(), b'1042:1043', "UID/GID of copied file") ret, out = ctr.exec_run(["cat", "/tmp/a.txt"]) self.assertEqual(ret, 0) - self.assertTrue(out.startswith(test_file_content), "assert file content") + self.assertEqual(out.rstrip(), test_file_content, "Content of copied file") finally: if ctr is not None: ctr.stop() @@ -251,4 +250,4 @@ class TestContainers(unittest.TestCase): volumes=["test_mount_preexisting_dir_vol:/workspace"]) ctr.start() ret, out = ctr.exec_run(["stat", "-c", "%u:%g", "/workspace"]) - self.assertTrue(out.startswith(b'1042:1043'), "assert correct uid/gid") + self.assertEqual(out.rstrip(), b'1042:1043', "UID/GID set in dockerfile") diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats index 054eda908..266f91298 100644 --- a/test/system/200-pod.bats +++ b/test/system/200-pod.bats @@ -205,6 +205,7 @@ function random_ip() { # entrypoint to confirm that --infra-command will override. local infra_image="infra_$(random_string 10 | tr A-Z a-z)" local infra_command="/pause_$(random_string 10)" + local infra_name="infra_container_$(random_string 10 | tr A-Z a-z)" run_podman build -t $infra_image - << EOF FROM $IMAGE RUN ln /home/podman/pause $infra_command @@ -225,7 +226,8 @@ EOF --publish "$port_out:$port_in" \ --label "${labelname}=${labelvalue}" \ --infra-image "$infra_image" \ - --infra-command "$infra_command" + --infra-command "$infra_command" \ + --infra-name "$infra_name" pod_id="$output" # Check --pod-id-file @@ -237,6 +239,9 @@ EOF # confirm that entrypoint is what we set run_podman container inspect --format '{{.Config.Entrypoint}}' $infra_cid 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" # Check each of the options if [ -n "$mac_option" ]; then @@ -310,6 +315,16 @@ EOF run_podman rm $cid run_podman pod rm -f mypod run_podman rmi $infra_image + +} + +@test "podman pod create should fail when infra-name is already in use" { + local infra_name="infra_container_$(random_string 10 | tr A-Z a-z)" + run_podman pod create --infra-name "$infra_name" + run_podman '?' pod create --infra-name "$infra_name" + if [ $status -eq 0 ]; then + die "Podman should fail when user try to create two pods with the same infra-name value" + fi } # vim: filetype=sh diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats index 5e2d66af9..a73ed94e8 100644 --- a/test/system/255-auto-update.bats +++ b/test/system/255-auto-update.bats @@ -249,7 +249,7 @@ EOF [Unit] Description=Podman auto-update testing service Documentation=man:podman-auto-update(1) -Wants=network.target +Wants=network-online.target After=network-online.target [Service] |