From f74c2ef645c5346062d53ddd0179f7b6e8c77f06 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 17 Jan 2023 17:02:04 +0100 Subject: [PATCH] tests: change the runtime-flag test for crun crun might not print any debugging message, so change the runtime-flag test to use --log=log-file and test it was created. Closes: https://github.com/containers/buildah/issues/4503 Signed-off-by: Giuseppe Scrivano --- tests/run.bats | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/run.bats b/tests/run.bats index 7f8d1d7d9c9..f6c879a6fdd 100644 --- a/tests/run.bats +++ b/tests/run.bats @@ -824,8 +824,10 @@ _EOF if [ -n "$(command -v crun)" ]; then found_runtime=y - run_buildah run --runtime=crun --runtime-flag=debug $cid true - assert "$output" != "" "Output from running 'true' with --runtime-flag=debug" + run_buildah run --runtime=crun --runtime-flag=log=${TEST_SCRATCH_DIR}/oci-log $cid true + if test -ne ${TEST_SCRATCH_DIR}/oci-log; then + die "the expected file ${TEST_SCRATCH_DIR}/oci-log was not created" + fi fi if [ -z "${found_runtime}" ]; then