Skip to content
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

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/run_test
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM.

Copy link
Contributor Author

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.

setfacl -R -m u:26:rwx "$config_dir"

# create a dir for data
Expand Down