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

More shared functions and test log readability #545

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Jan 4, 2024

  1. Revert "each container in run_change_password_test mounts its own vol…

    …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.
    hhorak committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    f9bb6f7 View commit details
    Browse the repository at this point in the history
  2. Gracefully shut down the original container

    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.
    hhorak committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    fc304f4 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2024

  1. Do not ignore SQL failures and check that we still work with previous…

    … 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.
    hhorak committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    652296e View commit details
    Browse the repository at this point in the history
  2. More shared functions and test log readability

    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.
    hhorak committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    28bd46b View commit details
    Browse the repository at this point in the history