Skip to content

Commit

Permalink
resolve issue, which bypass rhel7 version
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaysawant committed Jun 27, 2024
1 parent 2b2c5d7 commit ae78478
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/foreman/cli/test_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -2684,7 +2684,6 @@ def test_positive_create_host_with_lifecycle_environment_name(
found_host = any(new_host.name in i.values() for i in hosts)
assert found_host, 'Assertion failed: host not found'


@pytest.mark.rhel_ver_match('^6')
@pytest.mark.parametrize(
'setting_update', ['validate_host_lce_content_source_coherence'], indirect=False
Expand Down Expand Up @@ -2741,7 +2740,7 @@ def test_positive_host_registration_with_capsule(

# Check output for "HTTP error code 422: Validation failed: Content view environment content facets is invalid"
assert 'Validation failed' in result.stderr, f'Error is: {result.stderr}'
if '7' not in rhel_contenthost.deploy_rhel_version:
if not rhel_contenthost.os_version.major == 7:
assert 'HTTP error code 422' in result.stderr, f'Error is: {result.stderr}'

# Re-register client with settings "validate_host_lce_content_source_coherence" is set to No
Expand All @@ -2759,5 +2758,5 @@ def test_positive_host_registration_with_capsule(

# Check output there should not any error like "Validation failed" or "HTTP error code 422"
assert 'Validation failed' not in result.stderr, f'Error is: {result.stderr}'
if '7' not in rhel_contenthost.deploy_rhel_version:
assert 'HTTP error code 422' not in result.stderr, f'Error is: {result.stderr}'
if not rhel_contenthost.os_version.major == 7:
assert 'HTTP error code 422' not in result.stderr, f'Error is: {result.stderr}'

0 comments on commit ae78478

Please sign in to comment.