Skip to content

Commit

Permalink
Merge pull request #24291 from edsantiago/bats-safer-mypod
Browse files Browse the repository at this point in the history
System tests: safer pause-image creation
  • Loading branch information
openshift-merge-bot[bot] authored Oct 16, 2024
2 parents 27d73b0 + 1ddb15c commit 12c03ed
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions test/system/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,17 @@ function clean_setup() {
# Load (create, actually) the pause image. This way, all pod tests will
# have it available. Without this, pod tests run in parallel will leave
# behind <none>:<none> images.
# FIXME: we have to do this always, because there's no way (in bats 1.11)
# to tell if we're running in parallel. See bats-core#998
# FIXME: only do this when running parallel! Otherwise, we may break
# test expectations.
# SUB-FIXME: there's no actual way to tell if we're running bats
# in parallel (see bats-core#998). Use undocumented hack.
# FIXME: #23292 -- this should not be necessary.
run_podman pod create mypod
run_podman pod rm mypod
# And now, we have a pause image, and each test does not
# need to build their own.
if [[ -n "$BATS_SEMAPHORE_DIR" ]]; then
run_podman pod create mypod
run_podman pod rm mypod
# And now, we have a pause image, and each test does not
# need to build their own.
fi
}

# END setup/teardown tools
Expand Down

1 comment on commit 12c03ed

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podman-next COPR build failed. @containers/packit-build please check.

Please sign in to comment.