CLOS-2882: add regression tests for cl-mysql repository setup in target environment#60
Merged
prilr merged 3 commits intoMay 12, 2026
Conversation
When Governor manages MariaDB/MySQL, cl-mysql.repo repos are disabled (enabled=0). The CLOS-3833 fix force-enables cl-mysql-meta-N and mysqclient-N for the target userspace regardless. This test verifies that behaviour is preserved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…file The CLOS-2882 regression tests were failing 5/6 at runtime because _patch_env did not mock get_source_major_version, which is called from construct_repomap_data() in the common clmysql library. The get_target_major_version mock was also scoped to the wrong import site, so construct_repomap_data picked up the unpatched binding from leapp.libraries.common.clmysql. Move shared setup into a tests/conftest.py with patch_env and make_cl_mysql_repofile fixtures (imports deferred inside fixture bodies because Leapp injects the actor context during pytest collection). Split TestMismatchInhibitor into test_clmysql_mismatch.py since it covers a different feature (Governor/RPM type mismatch from CLOS-3833 follow-up) than the CLOS-2882 disabled-repos regression. All 6 tests now pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
azheregelya
approved these changes
May 12, 2026
This file contains hidden or 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
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.
After previous changes that addressed Governor-managed DB packages and versions, adding tests that cover the standard cases in relation to clmysqlrepositorysetup actor.