Skip to content

Commit

Permalink
Update ACS validation messages (#16752)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsedmik authored Oct 24, 2024
1 parent 3b5cfa0 commit 830f27e
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions tests/foreman/cli/test_acs.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def test_negative_check_custom_rhui_validations(module_target_sat, acs_type, mod
{'name': gen_alphanumeric(), 'alternate-content-source-type': acs_type}
)
assert VAL_FAILED in context.value.message, 'validation notification is missing or wrong'
assert f'Base url {VAL_CANT_BLANK}' in context.value.message
assert f'Base URL {VAL_CANT_BLANK}' in context.value.message
assert (
f'Verify ssl {VAL_CANT_BLANK}' in context.value.message
or 'Verify ssl must be provided' in context.value.message
Expand All @@ -187,10 +187,7 @@ def test_negative_check_custom_rhui_validations(module_target_sat, acs_type, mod
}
)
assert VAL_FAILED in context.value.message, 'validation notification is missing or wrong'
assert (
f'Products {VAL_MUST_BLANK}' in context.value.message
or f'Product ids {VAL_CANNOT_BE} set' in context.value.message
)
assert f'Product ids {VAL_CANNOT_BE} set' in context.value.message


@pytest.mark.tier2
Expand Down Expand Up @@ -236,24 +233,12 @@ def test_negative_check_simplified_validations(
with pytest.raises(CLIReturnCodeError) as context:
module_target_sat.cli.ACS.create(params)
assert VAL_FAILED in context.value.message, 'validation notification is missing or wrong'
assert f'Base url {VAL_MUST_BLANK}' in context.value.message
assert f'Base URL {VAL_MUST_BLANK}' in context.value.message
assert f'Subpaths {VAL_MUST_BLANK}' in context.value.message
assert (
f'Verify ssl {VAL_MUST_BLANK}' in context.value.message
or f'Verify ssl {VAL_CANNOT_BE} provided' in context.value.message
)
assert (
f'Ssl ca cert {VAL_MUST_BLANK}' in context.value.message
or f'Ssl ca cert {VAL_CANNOT_BE} set' in context.value.message
)
assert (
f'Ssl client cert {VAL_MUST_BLANK}' in context.value.message
or f'Ssl client cert {VAL_CANNOT_BE} set' in context.value.message
)
assert (
f'Ssl client key {VAL_MUST_BLANK}' in context.value.message
or f'Ssl client key {VAL_CANNOT_BE} set' in context.value.message
)
assert f'Verify ssl {VAL_CANNOT_BE} provided' in context.value.message
assert f'Ssl CA cert {VAL_CANNOT_BE} set' in context.value.message
assert f'Ssl client cert {VAL_CANNOT_BE} set' in context.value.message
assert f'Ssl client key {VAL_CANNOT_BE} set' in context.value.message
assert f'Upstream username {VAL_MUST_BLANK}' in context.value.message
assert f'Upstream password {VAL_MUST_BLANK}' in context.value.message

Expand Down

0 comments on commit 830f27e

Please sign in to comment.