-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error in run_pgaudit_test()
#596
Conversation
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 sclorg#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 sclorg#399
[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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means if the string is not empty. That's correct. Definition is here https://github.com/sclorg/postgresql-container/blob/master/test/run_test#L41. It means, that if variable is defined, then pgaudit is copied. Am I right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means if the string is not empty.
This is correct
if variable is defined, then pgaudit is copied
Yes as long as the variable is empty, if it's not, it's not copied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if my expectations or understanding of the code is correct.
[test] |
Testing Farm results
|
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 #537Problem is that
DOCKER_EXTRA_ARGS
variable is set already which it shouldn't be, so thetest
command returns 0, so nocp
happens and we get the crash.Variable is empty, but apparently do exist as
test -v DOCKER_EXTRA_ARGS
isTRUE
.Introduced by PR #399
Fixes: #595