From 9438c617e72f24b73f1f0e6732d4820a1aa5c734 Mon Sep 17 00:00:00 2001 From: Ales Nezbeda Date: Wed, 2 Oct 2024 14:12:37 +0200 Subject: [PATCH] Fix error in `run_pgaudit_test()` Initially command `test was missing`, but after it was added test failed and crashed in a way that no more tests were run. This behavior is known issue tracked here in issue #537 Problem is that `DOCKER_EXTRA_ARGS` variable is set already which it shouldn't be, so the `test` command returns 0, so no `cp` happens and we get the crash. Variable is empty, but apparently do exist as `test -v DOCKER_EXTRA_ARGS` is `TRUE`. Introduced by PR #399 --- test/run_test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/run_test b/test/run_test index 08260e6c..6e768a7d 100755 --- a/test/run_test +++ b/test/run_test @@ -934,7 +934,7 @@ run_pgaudit_test() # create a dir for config config_dir=$(mktemp -d --tmpdir pg-hook-volume.XXXXX) add_cleanup_command /bin/rm -rf "$config_dir" - -v DOCKER_EXTRA_ARGS || cp -r "$test_dir"/examples/pgaudit/* "$config_dir" + test -n "$DOCKER_EXTRA_ARGS" || cp -r "$test_dir"/examples/pgaudit/* "$config_dir" setfacl -R -m u:26:rwx "$config_dir" # create a dir for data