aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2022-01-06 19:39:05 -0700
committerEd Santiago <santiago@redhat.com>2022-01-10 12:14:53 -0700
commit508f9b76ea4475c3b9b0d3366e02b8b0b995d699 (patch)
tree62373e7b963c9ef90e5c5e06924d636ab931457c /test
parent87cd4b698cea28ef99b3b3326309b068b9aa7f04 (diff)
downloadpodman-508f9b76ea4475c3b9b0d3366e02b8b0b995d699.tar.gz
podman-508f9b76ea4475c3b9b0d3366e02b8b0b995d699.tar.bz2
podman-508f9b76ea4475c3b9b0d3366e02b8b0b995d699.zip
System tests: fix RHEL8 gating tests
Add a fix for RHEL8 gating tests. This resolves yet another journald/file events/logger mismatch bug. Also, while I'm at it, more log cleanup: a recently-added test was missing final rm/rmi, resulting in big red scary output in test logs. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/010-images.bats4
-rw-r--r--test/system/035-logs.bats8
2 files changed, 9 insertions, 3 deletions
diff --git a/test/system/010-images.bats b/test/system/010-images.bats
index 201418620..ebd71450f 100644
--- a/test/system/010-images.bats
+++ b/test/system/010-images.bats
@@ -272,6 +272,10 @@ Deleted: $pauseID" "infra images gets removed as well"
is "$output" ""
run_podman create --pod new:$pname $IMAGE
+ # Clean up
+ run_podman rm "${lines[-1]}"
+ run_podman pod rm -a
+ run_podman rmi $pauseImage
}
@test "podman images - rmi -f can remove infra images" {
diff --git a/test/system/035-logs.bats b/test/system/035-logs.bats
index 3caf97a22..db50c8f8c 100644
--- a/test/system/035-logs.bats
+++ b/test/system/035-logs.bats
@@ -90,14 +90,16 @@ ${cid[0]} d" "Sequential output from logs"
}
function _log_test_restarted() {
- run_podman run --log-driver=$1 --name logtest $IMAGE sh -c 'start=0; if test -s log; then start=`tail -n 1 log`; fi; seq `expr $start + 1` `expr $start + 10` | tee -a log'
+ local driver=$1
+ local events_backend=$(_additional_events_backend $driver)
+ run_podman run --log-driver=$driver ${events_backend} --name logtest $IMAGE sh -c 'start=0; if test -s log; then start=`tail -n 1 log`; fi; seq `expr $start + 1` `expr $start + 10` | tee -a log'
# FIXME: #9597
# run/start is flaking for remote so let's wait for the container condition
# to stop wasting energy until the root cause gets fixed.
run_podman container wait --condition=exited logtest
- run_podman start -a logtest
+ run_podman ${events_backend} start -a logtest
logfile=$(mktemp -p ${PODMAN_TMPDIR} logfileXXXXXXXX)
- $PODMAN $_PODMAN_TEST_OPTS logs -f logtest > $logfile
+ $PODMAN $_PODMAN_TEST_OPTS ${events_backend} logs -f logtest > $logfile
expected=$(mktemp -p ${PODMAN_TMPDIR} expectedXXXXXXXX)
seq 1 20 > $expected
diff -u ${expected} ${logfile}