Skip to content

Commit

Permalink
podman create: building local pause image: do not read ignore files
Browse files Browse the repository at this point in the history
Make sure to ignore local {container,docker}ignore files when building a
local pause image.  Otherwise, we may mistakenly not be able to copy
catatonit into the build container.

Fixes: containers#13529
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Krzysztof Baran <krysbaran@gmail.com>
  • Loading branch information
vrothberg authored and kbaran1998 committed Mar 24, 2022
1 parent c8d4dcb commit 826b97f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/system/200-pod.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ load helpers
function teardown() {
run_podman pod rm -f -t 0 -a
run_podman rm -f -t 0 -a
run_podman rmi --ignore $(pause_image)
run_podman ? rmi $(pause_image)
basic_teardown
}

Expand Down Expand Up @@ -317,17 +317,16 @@ EOF

@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)"
local infra_image="k8s.gcr.io/pause:3.5"
local pod_name="$(random_string 10 | tr A-Z a-z)"

run_podman --noout pod create --name $pod_name --infra-name "$infra_name" --infra-image "$infra_image"
is "$output" "" "output from pod create should be empty"
run_podman --noout pod create --name $pod_name --infra-name "$infra_name" --infra-image "k8s.gcr.io/pause:3.5"
is "$output" "" "output should be empty"
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
run_podman pod rm -f $pod_name
run_podman rmi $infra_image
run_podman images -a
}

@test "podman pod create --share" {
Expand Down

0 comments on commit 826b97f

Please sign in to comment.