mirror of
https://github.com/containers/skopeo.git
synced 2025-06-28 15:47:34 +00:00
Cirrus: Add a common intra-test reset function
This is necessary, since running the skopeo tests modifies the host environment. This can result in some warning messages the first time a container is started. These messages can interfere with tests which are sensitive to stdout/stderr. Since many/most tests require a local image registry, launch it with `/bin/true` after doing a system reset to clear away any pesky warning messages. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
parent
292962d34c
commit
1fac61ef57
@ -112,18 +112,32 @@ _run_unit() {
|
||||
make test-unit-local BUILDTAGS="$BUILDTAGS"
|
||||
}
|
||||
|
||||
_run_integration() {
|
||||
_podman_reset() {
|
||||
# Ensure we start with a clean-slate
|
||||
podman system reset --force
|
||||
showrun podman system reset --force
|
||||
# Don't pollute the CI environment
|
||||
(
|
||||
source $CIRRUS_WORKING_DIR/systemtest/helpers.bash
|
||||
# WARNING WARNING WARNING WARNING
|
||||
# Without running a container, the system tests will inexplicably
|
||||
# fail with obscure errors/warning messages. I have no idea why
|
||||
# running a container after a `system reset` fixes/prevents the
|
||||
# problem. The failures do not reproduce when tests are run manually.
|
||||
# So unless or until /until somebody develops a better understanding,
|
||||
# this fix is JFM.
|
||||
# WARNING WARNING WARNING WARNING
|
||||
showrun podman run -it --rm --entrypoint /bin/true $REGISTRY_FQIN
|
||||
)
|
||||
}
|
||||
|
||||
_run_integration() {
|
||||
_podman_reset
|
||||
make test-integration-local BUILDTAGS="$BUILDTAGS"
|
||||
}
|
||||
|
||||
_run_system() {
|
||||
# Ensure we start with a clean-slate
|
||||
podman system reset --force
|
||||
|
||||
# Executes with containers required for testing.
|
||||
_podman_reset
|
||||
##### Note: Test MODIFIES THE HOST SETUP #####
|
||||
make test-system-local BUILDTAGS="$BUILDTAGS"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user