-
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
More shared functions and test log readability #545
Draft
hhorak
wants to merge
4
commits into
sclorg:master
Choose a base branch
from
hhorak:use-fncs-from-test-lib
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ume" This reverts commit 62a0e88. Creating a new volume directory was actually NOOP, because the variable volume_options was not updated. What we need to get rid of SELinux messages that this fix tried to address is to properly shut down previous container. That will be done in the following commit. Background: podman's :Z modificator for volumes works the way that the latest container run with the same volume directory mounted with :Z modificator has access, the previous containers are kept running, but access to the shared directory is suddenly removed. That caused the first instance of PostgreSQL server to crash with SIGSEGV actually, while triggering some SELinux error message during that.
With keeping the container running, we see SELinux error messages and sudden crash of the PostgreSQL container. Let's properly shut down the container before using its volume privately mounted into a different container. Background: podman's :Z modificator for volumes works the way that the latest container run with the same volume directory mounted with :Z modificator has access, the previous containers are kept running, but access to the shared directory is suddenly removed. That caused the first instance of PostgreSQL server to crash with SIGSEGV actually, while triggering some SELinux error message during that.
… data when changing password Fix also postgresql_cmd function that should not ignore SQL errors (thus using ON_ERROR_STOP option now) and was often called with an interactive input using <<< but podman run is run in non-interactive mode, resulting in the SQL commands to not be printed, so checking them later did not work and errors are not visible. Using -c option solves this. Function test_postgresql was called with a parameter that was not used anywhere. This function used CREATE EXTENSION to test proper PostgreSQL functionality, that only admin have permissions for. So, the parameter of test_postgresql function was changed to have a useful meaning. The meaning is that only if the parameter is "admin", the CREATE EXTENSION statement is run to not see "Not enough permissions" error when the contianer is run as a normal user.
This combines two changes that both improve test script, so I did not bother to split it to two commits. One is using more functions from the test-lib shared library, and second is removing expected warnings from the test log, to make the log more readable and easier to spot the issues.
Pull Request validationFailed🔴 Review - Missing review from a member (1 required) Success🟢 CI - All checks have passed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This combines two changes that both improve test script, so I did not bother to split it to two commits. One is using more functions from the test-lib shared library, and second is removing expected warnings from the test log, to make the log more readable and easier to spot the issues.
This PR builds on top of #544 and #543 (to avoid merge conflicts), and those PRs must be merged before.