Skip to content

CLOS-2882: add regression tests for cl-mysql repository setup in target environment#60

Merged
prilr merged 3 commits into
cloudlinux:cloudlinuxfrom
prilr:CLOS-2882-cl-elevate-failing-on-governor-mariadb-1
May 12, 2026
Merged

CLOS-2882: add regression tests for cl-mysql repository setup in target environment#60
prilr merged 3 commits into
cloudlinux:cloudlinuxfrom
prilr:CLOS-2882-cl-elevate-failing-on-governor-mariadb-1

Conversation

@prilr
Copy link
Copy Markdown
Collaborator

@prilr prilr commented May 11, 2026

After previous changes that addressed Governor-managed DB packages and versions, adding tests that cover the standard cases in relation to clmysqlrepositorysetup actor.

prilr and others added 3 commits May 6, 2026 10:05
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>
@prilr prilr merged commit 173aefc into cloudlinux:cloudlinux May 12, 2026
1 check passed
@prilr prilr deleted the CLOS-2882-cl-elevate-failing-on-governor-mariadb-1 branch May 12, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants