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

fix in hosts param crud test #15596

Merged
merged 1 commit into from
Jul 11, 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
9 changes: 4 additions & 5 deletions tests/foreman/cli/test_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,18 +1105,17 @@ def test_positive_parameter_crud(function_host, target_sat):
{'host-id': function_host['id'], 'name': name, 'value': value}
)
host = target_sat.cli.Host.info({'id': function_host['id']})
assert name in host['parameters']
assert value == host['parameters'][name]
assert (name, value) in [(param['name'], param['value']) for param in host['parameters']]

new_value = valid_data_list()[name]
target_sat.cli.Host.set_parameter({'host-id': host['id'], 'name': name, 'value': new_value})
host = target_sat.cli.Host.info({'id': host['id']})
assert name in host['parameters']
assert new_value == host['parameters'][name]

assert (name, new_value) in [(param['name'], param['value']) for param in host['parameters']]

target_sat.cli.Host.delete_parameter({'host-id': host['id'], 'name': name})
host = target_sat.cli.Host.info({'id': host['id']})
assert name not in host['parameters']
assert name not in [param['name'] for param in host['parameters']]


# -------------------------- HOST PARAMETER SCENARIOS -------------------------
Expand Down