Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ACS validation messages #16752

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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