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

[6.14.z] Update error message in negative settings test #13308

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
5 changes: 3 additions & 2 deletions tests/foreman/ui/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_positive_httpd_proxy_url_update(session, setting_update):


@pytest.mark.tier2
@pytest.mark.parametrize('setting_update', ['foreman_url', 'entries_per_page'], indirect=True)
@pytest.mark.parametrize('setting_update', ['foreman_url'], indirect=True)
def test_negative_validate_foreman_url_error_message(session, setting_update):
"""Updates some settings with invalid values (an exceptional tier2 test)

Expand All @@ -136,9 +136,10 @@ def test_negative_validate_foreman_url_error_message(session, setting_update):
property_name = setting_update.name
with session:
invalid_value = [invalid_value for invalid_value in invalid_settings_values()][0]
err_msg = 'URL must be valid and schema must be one of http and https, Invalid HTTP(S) URL'
with pytest.raises(AssertionError) as context:
session.settings.update(f'name = {property_name}', invalid_value)
assert 'Value is invalid: must be integer' in str(context.value)
assert err_msg in str(context.value)


@pytest.mark.tier2
Expand Down