Skip to content

Container PyTest suite for Postgresql-container#640

Open
phracek wants to merge 15 commits intosclorg:masterfrom
phracek:container_pytests
Open

Container PyTest suite for Postgresql-container#640
phracek wants to merge 15 commits intosclorg:masterfrom
phracek:container_pytests

Conversation

@phracek
Copy link
Copy Markdown
Member

@phracek phracek commented Jan 6, 2026

This pull request adds PyTest suite migrated from run_pytest scripts.

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_logging.py

All tests are migrated except run_migration_test and run_upgrade_test.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 6, 2026

Pull Request validation

Failed

🔴 Review - Missing review from a member (1 required)

Success

🟢 CI - All checks have passed

@phracek
Copy link
Copy Markdown
Member Author

phracek commented Jan 6, 2026

Let's try first round
[test-pytest]

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 6, 2026

Testing Farm results

namecomposearchstatusstarted (UTC)timelogs
Fedora - PyTest - 16Fedora-latestx86_64✅ passed01.04.2026 11:48:0212min 59stest pipeline
Fedora - PyTest - 15Fedora-latestx86_64✅ passed01.04.2026 11:43:5811min 41stest pipeline
CentOS Stream 9 - PyTest - 13CentOS-Stream-9x86_64✅ passed01.04.2026 11:52:4713min 29stest pipeline
CentOS Stream 10 - PyTest - 16CentOS-Stream-10x86_64✅ passed01.04.2026 12:02:2116min 28stest pipeline
CentOS Stream 9 - PyTest - 15CentOS-Stream-9x86_64✅ passed01.04.2026 12:06:2114min 50stest pipeline
CentOS Stream 9 - PyTest - 16CentOS-Stream-9x86_64✅ passed01.04.2026 11:50:0215min 48stest pipeline
RHEL10 - Unsubscribed host - PyTest - 16RHEL-10.2-Nightlyx86_64✅ passed01.04.2026 11:28:1319min 32stest pipeline
RHEL8 - PyTest - 12RHEL-8.10.0-Nightlyx86_64✅ passed01.04.2026 11:22:3917min test pipeline
RHEL8 - PyTest - 16RHEL-8.10.0-Nightlyx86_64✅ passed01.04.2026 11:27:4619min 56stest pipeline
RHEL9 - Unsubscribed host - PyTest - 13RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:23:3419min 12stest pipeline
RHEL9 - Unsubscribed host - PyTest - 16RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:22:4120min 59stest pipeline
RHEL9 - Unsubscribed host - PyTest - 15RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:51:5420min 20stest pipeline
RHEL9 - PyTest - 15RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 12:02:1225min 50stest pipeline
RHEL8 - PyTest - 15RHEL-8.10.0-Nightlyx86_64✅ passed31.03.2026 16:08:0819min 7stest pipeline
RHEL9 - PyTest - 13RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:27:3423min 9stest pipeline
RHEL9 - PyTest - 16RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:23:4226min 14stest pipeline
RHEL10 - PyTest - 16RHEL-10.2-Nightlyx86_64✅ passed01.04.2026 11:39:3120min 5stest pipeline
RHEL8 - PyTest - 13RHEL-8.10.0-Nightlyx86_64✅ passed01.04.2026 11:23:3118min 53stest pipeline
Fedora - PyTest - 18Fedora-latestx86_64✅ passed01.04.2026 11:23:3810min 33stest pipeline
CentOS Stream 9 - PyTest - 18CentOS-Stream-9x86_64✅ passed01.04.2026 12:00:2920min 27stest pipeline
RHEL9 - Unsubscribed host - PyTest - 18RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:27:3421min 34stest pipeline
RHEL10 - PyTest - 18RHEL-10.2-Nightlyx86_64✅ passed01.04.2026 11:52:2621min 16stest pipeline
RHEL10 - Unsubscribed host - PyTest - 18RHEL-10.2-Nightlyx86_64✅ passed01.04.2026 11:36:2823min 31stest pipeline
RHEL9 - PyTest - 18RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:56:2226min 15stest pipeline
CentOS Stream 10 - PyTest - 18CentOS-Stream-10x86_64✅ passed01.04.2026 11:23:3515min 16stest pipeline
Fedora - 16Fedora-latestx86_64✅ passed01.04.2026 12:03:1910min 54stest pipeline
CentOS Stream 10 - 16CentOS-Stream-10x86_64✅ passed01.04.2026 11:24:0310min 55stest pipeline
CentOS Stream 9 - 13CentOS-Stream-9x86_64✅ passed01.04.2026 11:54:2511min 32stest pipeline
CentOS Stream 9 - 15CentOS-Stream-9x86_64✅ passed01.04.2026 11:21:4312min 12stest pipeline
RHEL10 - 16RHEL-10.2-Nightlyx86_64✅ passed01.04.2026 11:55:2417min 20stest pipeline
RHEL8 - 15RHEL-8.10.0-Nightlyx86_64✅ passed31.03.2026 16:08:0416min 34stest pipeline
RHEL10 - Unsubscribed host - 18RHEL-10.2-Nightlyx86_64✅ passed01.04.2026 12:06:4219min 35stest pipeline
RHEL9 - 13RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:38:5722min 9stest pipeline
RHEL9 - Unsubscribed host - 16RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:30:2621min 45stest pipeline
RHEL9 - 15RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:28:0423min 9stest pipeline
Fedora - 15Fedora-latestx86_64✅ passed01.04.2026 11:48:2710min 6stest pipeline
RHEL8 - 12RHEL-8.10.0-Nightlyx86_64✅ passed01.04.2026 11:36:0317min 22stest pipeline
CentOS Stream 9 - 16CentOS-Stream-9x86_64✅ passed01.04.2026 11:27:3912min 21stest pipeline
Fedora - 18Fedora-latestx86_64✅ passed01.04.2026 11:36:0610min 22stest pipeline
RHEL9 - Unsubscribed host - 13RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:45:1618min 56stest pipeline
RHEL9 - 18RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:35:0328min 3stest pipeline
CentOS Stream 9 - 18CentOS-Stream-9x86_64✅ passed01.04.2026 11:41:0013min 37stest pipeline
RHEL10 - Unsubscribed host - 16RHEL-10.2-Nightlyx86_64✅ passed01.04.2026 12:01:4916min 49stest pipeline
RHEL9 - Unsubscribed host - 18RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:48:3421min 29stest pipeline
RHEL8 - 13RHEL-8.10.0-Nightlyx86_64✅ passed01.04.2026 11:43:5416min 8stest pipeline
RHEL9 - 16RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 12:14:1623min 7stest pipeline
RHEL8 - 16RHEL-8.10.0-Nightlyx86_64✅ passed01.04.2026 11:41:5717min 40stest pipeline
RHEL10 - 18RHEL-10.2-Nightlyx86_64✅ passed01.04.2026 12:11:0420min 7stest pipeline
RHEL9 - Unsubscribed host - 15RHEL-9.8.0-Nightlyx86_64✅ passed01.04.2026 11:39:5820min 36stest pipeline
CentOS Stream 10 - 18CentOS-Stream-10x86_64✅ passed01.04.2026 11:52:0212min 2stest pipeline

@phracek
Copy link
Copy Markdown
Member Author

phracek commented Jan 7, 2026

Let's try next round
[test-pytest]

Copy link
Copy Markdown
Contributor

@pkhartsk pkhartsk left a 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

@phracek
Copy link
Copy Markdown
Member Author

phracek commented Mar 18, 2026

I will rewrite it so that each commit will represent each test suite and ocp_renaming will be a part of another PR.

@phracek
Copy link
Copy Markdown
Member Author

phracek commented Mar 31, 2026

@fila43 Please review parts test_container_upgrade.py and test_container_migration.py. The pagila is now part of this repo. In case you would like to download it e.g. from https://github.com/devrimgunduz/pagila, then please let me know. Thanks.

phracek added 7 commits April 1, 2026 13:11
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
run_s2i_test -> test_container_basics.py

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
run_container_creation_tests -> test_container_configuration.py
run_test_cfg_hook -> test_container_configuration.py

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
run_pgaudit_test -> test_container_extensions.py
run_pgvector_test -> test_container_extensions.py
run_env_extension_load_test -> test_container_extensions.py

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
run_general_tests -> test_container_general.py

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
run_logging_test -> test_container_logging.py

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
run_change_password_test -> test_container_password

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
phracek added 8 commits April 1, 2026 13:11
run_replication_test -> test_container_replication.py

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
run_s2i_bake_data_test -> test_container_ssl.py
run_s2i_enable_ssl_test -> test_container_ssl.py

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Test summary for version 16

```
=========================== short test summary info ============================
PASSED test_container_migrate.py::TestPostgreSQLMigration::test_migration_functionality[13]
PASSED test_container_migrate.py::TestPostgreSQLMigration::test_migration_functionality[15]
SKIPPED [1] test_container_migrate.py:55: registry.redhat.io/rhel9/postgresql-12 image not found in registry so skipping migration test..
SKIPPED [1] test_container_migrate.py:51: Migration path from 16 -> 16 is not valid so skipping.
SKIPPED [1] test_container_migrate.py:51: Migration path from 18 -> 16 is not valid so skipping.
```

Test summary for version 18
```
=========================== short test summary info ============================
PASSED test_container_migrate.py::TestPostgreSQLMigration::test_migration_functionality[13]
PASSED test_container_migrate.py::TestPostgreSQLMigration::test_migration_functionality[15]
PASSED test_container_migrate.py::TestPostgreSQLMigration::test_migration_functionality[16]
SKIPPED [1] test_container_migrate.py:55: registry.redhat.io/rhel9/postgresql-12 image not found in registry so skipping migration test..
SKIPPED [1] test_container_migrate.py:51: Migration path from 18 -> 18 is not valid so skipping.

```

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Skip in case of previous version does not exist

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Sometimes /usr/libexec/check-container does not work
properly.
Let's check it by accepting connections by simple command

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@phracek phracek force-pushed the container_pytests branch from 6ae07ed to 5217d9d Compare April 1, 2026 11:11
@phracek
Copy link
Copy Markdown
Member Author

phracek commented Apr 1, 2026

Rebased against 'master' branch

[test-pytest][test]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants