-
Notifications
You must be signed in to change notification settings - Fork 219
Container PyTest suite for Postgresql-container #640
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Petr "Stone" Hracek <[email protected]>
The migration matrix is following: run_container_creation_tests -> test_container_configuration.py run_general_tests -> test_container_general.py run_change_password_test -> test_container_password.py run_replication_test -> test_container_replication.py run_s2i_test -> test_container_basics.py run_test_cfg_hook -> test_container_configuration.py run_s2i_bake_data_test -> test_container_ssl.py run_s2i_enable_ssl_test -> test_container_ssl.py run_pgaudit_test -> test_container_extensions.py run_pgvector_test -> test_container_extensions.py run_env_extension_load_test -> test_container_extensions.py run_logging_test -> test_container_extensions.py The following tests are NOT migrated yet. run_migration_test and run_upgrade_tests. Signed-off-by: Petr "Stone" Hracek <[email protected]>
Pull Request validationFailed🔴 Review - Missing review from a member (1 required) Success🟢 CI - All checks have passed |
|
Let's try first round |
Testing Farm results
|
Don not call the function twice Signed-off-by: Petr "Stone" Hracek <[email protected]>
d7126c2 to
a7a86fd
Compare
|
Let's try next round |
function Signed-off-by: Petr "Stone" Hracek <[email protected]>
pkhartsk
left a comment
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.
Found some things and included proposed fixes for both
| container_id=VARS.IMAGE_NAME, | ||
| username="postgres", | ||
| password=admin_password, | ||
| database="postgres?sslmode=require", |
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 technically produces the correct URI string, but ?sslmode=require isn't part of the database name and should be treated separately as an argument/parameter.
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.
And if one were to URI encode the database name like I propose we do in the bash tests, the string would come out to postgresql://postgres@ip:5432/postgres%3Fsslmode%3Drequire which obviously fails.
So I suggest that postgresql_cmd be modified to include a parameters argument where these would be included.
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.
Fixed in pkhartsk@ac44275
and sclorg/container-ci-suite#153
| [ | ||
| '"the user"', | ||
| '"the pass"', | ||
| '"the db"', | ||
| "", | ||
| ], |
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 defines the username as the user when creating the container because it's passed as an environment variable, but as "the user" when connecting to it, which is different from the former. I suggest removing the single quotes and instead surrounding psql_user etc. with double quotes below (line 173-181) inside the f-strings.
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.
Fixed in pkhartsk@7bfdc55
and sclorg/container-ci-suite#153
This pull request adds PyTest suite migrated from
run_pytestscripts.All tests are migrated except
run_migration_testandrun_upgrade_test.