Skip to content

Add PyTest suite to mariadb-container#311

Merged
phracek merged 11 commits intosclorg:masterfrom
phracek:container_pytests
Feb 9, 2026
Merged

Add PyTest suite to mariadb-container#311
phracek merged 11 commits intosclorg:masterfrom
phracek:container_pytests

Conversation

@phracek
Copy link
Member

@phracek phracek commented Dec 4, 2025

Migration matrix is:

  • run_container_creation_tests -> test_container_configuration.py(test_try_image_invalid_combinations, test_container_creation_fails, test_invalid_configuration_tests.py
  • run_configuration_tests -> test_container_configuration.py(TestMariaDBConfigurationTests and TestsMariaDBConfiguratioTest) TestMariaDB
  • run_general_tests -> test_container_general.py(test_run and test_datadir)
  • run_change_password_test -> test_container_password.py
  • run_change_password_new_user_test -> test_container_password.py
  • run_replication_test -> test_container_replication.py
  • run_s2i_test -> test_container_basics.py
  • run_ssl_test -> test_container_basics.py
  • run_upgrade_test -> test_container_upgrade.py
  • run_plugin_test -> test_container_plugin.py

@phracek
Copy link
Member Author

phracek commented Dec 4, 2025

[test-pytest]

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Pull Request validation

Failed

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

Success

🟢 CI - All checks have passed

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Testing Farm results

namecomposearchstatusstarted (UTC)timelogs
Fedora - PyTest - 11.8Fedora-latestx86_64✅ passed03.02.2026 10:43:1513min 11stest pipeline
Fedora - PyTest - 10.11Fedora-latestx86_64✅ passed03.02.2026 10:43:1311min 27stest pipeline
CentOS Stream 9 - PyTest - 10.11CentOS-Stream-9x86_64✅ passed03.02.2026 10:33:2115min 13stest pipeline
CentOS Stream 10 - PyTest - 10.11CentOS-Stream-10x86_64✅ passed03.02.2026 10:33:2112min 23stest pipeline
RHEL10 - PyTest - 10.11RHEL-10-Nightlyx86_64✅ passed03.02.2026 10:33:2418min 48stest pipeline
RHEL9 - PyTest - 10.5RHEL-9.6.0-Nightlyx86_64✅ passed03.02.2026 09:46:1421min 32stest pipeline
RHEL9 - PyTest - 10.11RHEL-9.6.0-Nightlyx86_64✅ passed03.02.2026 09:33:0822min 55stest pipeline
RHEL9 - Unsubscribed host - PyTest - 10.11RHEL-9.6.0-Nightlyx86_64✅ passed03.02.2026 09:33:1118min 25stest pipeline
RHEL8 - PyTest - 10.5RHEL-8.10.0-Nightlyx86_64✅ passed03.02.2026 09:43:3617min 7stest pipeline
RHEL9 - Unsubscribed host - PyTest - 10.5RHEL-9.6.0-Nightlyx86_64✅ passed03.02.2026 09:50:1417min 26stest pipeline
RHEL8 - PyTest - 10.3RHEL-8.10.0-Nightlyx86_64✅ passed14.01.2026 09:06:5435min 23stest pipeline
RHEL10 - Unsubscribed host - PyTest - 10.11RHEL-10-Nightlyx86_64✅ passed03.02.2026 10:33:2218min 52stest pipeline
CentOS Stream 9 - PyTest - 10.5CentOS-Stream-9x86_64✅ passed03.02.2026 10:33:2114min 15stest pipeline
RHEL8 - PyTest - 10.11RHEL-8.10.0-Nightlyx86_64✅ passed03.02.2026 09:41:3918min 14stest pipeline
Fedora - 10.11Fedora-latestx86_64✅ passed03.02.2026 10:33:218min 53stest pipeline
Fedora - 11.8Fedora-latestx86_64✅ passed03.02.2026 10:43:0410min 20stest pipeline
CentOS Stream 9 - 10.5CentOS-Stream-9x86_64✅ passed03.02.2026 10:33:2210min 53stest pipeline
CentOS Stream 9 - 10.11CentOS-Stream-9x86_64✅ passed03.02.2026 10:43:1112min 29stest pipeline
RHEL10 - Unsubscribed host - 10.11RHEL-10-Nightlyx86_64✅ passed03.02.2026 10:43:1912min 49stest pipeline
RHEL9 - Unsubscribed host - 10.11RHEL-9.6.0-Nightlyx86_64✅ passed03.02.2026 09:33:0918min 30stest pipeline
RHEL9 - 10.11RHEL-9.6.0-Nightlyx86_64✅ passed14.01.2026 09:17:3636min 14stest pipeline
RHEL9 - 10.5RHEL-9.6.0-Nightlyx86_64✅ passed03.02.2026 09:33:0819min 56stest pipeline
CentOS Stream 10 - 10.11CentOS-Stream-10x86_64✅ passed03.02.2026 10:43:259min 23stest pipeline
RHEL8 - 10.11RHEL-8.10.0-Nightlyx86_64✅ passed03.02.2026 09:41:3816min 10stest pipeline
RHEL8 - 10.3RHEL-8.10.0-Nightlyx86_64✅ passed03.02.2026 09:33:0916min 46stest pipeline
RHEL8 - 10.5RHEL-8.10.0-Nightlyx86_64✅ passed03.02.2026 09:33:1216min 5stest pipeline
RHEL10 - 10.11RHEL-10-Nightlyx86_64✅ passed03.02.2026 10:33:2415min 37stest pipeline
RHEL9 - Unsubscribed host - 10.5RHEL-9.6.0-Nightlyx86_64✅ passed03.02.2026 09:41:3117min 36stest pipeline

@phracek
Copy link
Member Author

phracek commented Dec 5, 2025

[test-pytest]

@phracek
Copy link
Member Author

phracek commented Dec 12, 2025

re-trigger tests after a hude refactoring.

[test][test-pytest]

@phracek
Copy link
Member Author

phracek commented Dec 15, 2025

re-trigger tests after fixing issue on Fedora

[test][test-pytest]

@phracek
Copy link
Member Author

phracek commented Jan 9, 2026

[test][test-pytest]

@phracek
Copy link
Member Author

phracek commented Jan 12, 2026

@frenzymadness PTAL in case you have free time.

Copy link
Member

@frenzymadness frenzymadness left a comment

Choose a reason for hiding this comment

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

This PR adds 1355 lines of code so it will take a while to review it. I'm submitting what I have so far so we can ping-pong small portions of it.

@phracek
Copy link
Member Author

phracek commented Jan 14, 2026

@frenzymadness I have tryied to address all issues. As soon as you will have a spare time. Please look at this.

Next time, we can add each test by simple PR for better review.

It makes sense for me to PostgreSQL container.

@phracek
Copy link
Member Author

phracek commented Jan 14, 2026

[test-pytest][test]

Copy link
Member

@frenzymadness frenzymadness left a comment

Choose a reason for hiding this comment

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

I've found some possible improvements, but nothing really serious, so do whatever you prefer with them and merge this PR then. Sorry it took me so long to do the review.

phracek and others added 10 commits February 3, 2026 10:29
Migration matrix is:

- run_container_creation_tests -> test_container_configuration.py(test_try_image_invalid_combinations,
  test_container_creation_fails, test_invalid_configuration_tests.py
- run_configuration_tests ->
  test_container_configuration.py(TestMariaDBConfigurationTests and
  TestsMariaDBConfiguratioTest)
  TestMariaDB
- run_general_tests -> test_container_general.py(test_run and
  test_datadir)
- run_change_password_test -> test_container_password.py
- run_change_password_new_user_test -> test_container_password.py
- run_replication_test -> test_container_replication.py
- run_s2i_test -> test_container_basics.py
- run_ssl_test -> test_container_basics.py
- run_upgrade_test -> test_container_upgrade.py
- run_plugin_test -> test_container_plugin.py

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Lets' connect to proper DB including --disable certificates

Let's check if Slave is really  runnning before SQL command is called.

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Call sql commands at once.
Change initial names to understandable.
Use DatabaseWrapper directly to call sql commands.

Check mariadb configuration values together. Do not duplicate code.

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
and parametrized it.

It is easier to review code.

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
is defined in VARS variable directly

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Update also description for better reading what each test does
in case it is huge

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
if mariadb contains proper settings

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
The function is already part of container-ci-suite.

Add several documentation part to the tests

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
Remove tests `test_datadir_actions` that is part of
`test_container_upgrade.py`. So removed.

For testing settings new_password and new_user
only one function is used.

Remove not needed comment

Several documentation updates

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@phracek
Copy link
Member Author

phracek commented Feb 3, 2026

[test-pytest][test]

@phracek phracek merged commit 15ad13e into sclorg:master Feb 9, 2026
30 checks passed
phracek added a commit to sclorg/mysql-container that referenced this pull request Feb 27, 2026
phracek added a commit to phracek/mysql-container that referenced this pull request Feb 27, 2026
phracek added a commit to phracek/mysql-container that referenced this pull request Mar 16, 2026
phracek added a commit to sclorg/mysql-container that referenced this pull request Mar 17, 2026
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.

2 participants