Skip to content

Commit

Permalink
Move CustomReposAreValid to pre_ponr_changes stage
Browse files Browse the repository at this point in the history
Moving the CustomReposAreValid to pre_ponr_changes to be a dependency of
SUBSCRIBE_SYSTEM.
  • Loading branch information
r0x0d committed Sep 12, 2024
1 parent 81b0255 commit 8ba6221
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

class CustomReposAreValid(actions.Action):
id = "CUSTOM_REPOSITORIES_ARE_VALID"
dependencies = ("SUBSCRIBE_SYSTEM",)

def run(self):
"""To prevent failures past the PONR, make sure that the enabled custom repositories are valid.
Expand All @@ -38,7 +39,7 @@ def run(self):
logger.task("Prepare: Check if --enablerepo repositories are accessible")

if not tool_opts.enablerepo:
logger.info("Skipping the check as there was no --enablerepo option detected in the command-line.")
logger.info("Did not perform the check of repositories due to the use of RHSM for the conversion.")
return

output, ret_code = call_yum_cmd(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import pytest

from convert2rhel import unit_tests
from convert2rhel.actions.system_checks import custom_repos_are_valid
from convert2rhel.actions.pre_ponr_changes import custom_repos_are_valid


@pytest.fixture
Expand Down Expand Up @@ -68,6 +68,6 @@ def test_custom_repos_are_valid_skip(custom_repos_are_valid_action, monkeypatch,
custom_repos_are_valid_action.run()

assert (
"Skipping the check as there was no --enablerepo option detected in the command-line."
"Did not perform the check of repositories due to the use of RHSM for the conversion."
in caplog.records[-1].message
)

0 comments on commit 8ba6221

Please sign in to comment.