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

forgotten target sat in host cli tests #14237

Merged
merged 1 commit into from
Mar 4, 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
26 changes: 9 additions & 17 deletions tests/foreman/cli/test_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -2456,15 +2456,15 @@ def test_positive_host_with_puppet(
location=[host_template.location],
).update(['location', 'organization'])

session_puppet_enabled_sat.cli.target_sat.cli.Host.update(
session_puppet_enabled_sat.cli.Host.update(
{
'name': host.name,
'puppet-environment': module_puppet_environment.name,
}
)
host = session_puppet_enabled_sat.cli.target_sat.cli.Host.info({'id': host['id']})
host = session_puppet_enabled_sat.cli.Host.info({'id': host['id']})
assert host['puppet-environment'] == module_puppet_environment.name
session_puppet_enabled_sat.cli.target_sat.cli.Host.delete({'id': host['id']})
session_puppet_enabled_sat.cli.Host.delete({'id': host['id']})


@pytest.fixture
Expand Down Expand Up @@ -2543,9 +2543,7 @@ class are listed
scp_id = choice(sc_params_list)['id']
session_puppet_enabled_sat.cli.SmartClassParameter.update({'id': scp_id, 'override': 1})
# Verify that affected sc-param is listed
host_scparams = session_puppet_enabled_sat.cli.target_sat.cli.Host.sc_params(
{'host': host['name']}
)
host_scparams = session_puppet_enabled_sat.cli.Host.sc_params({'host': host['name']})
assert scp_id in [scp['id'] for scp in host_scparams]


Expand Down Expand Up @@ -2580,9 +2578,7 @@ def test_positive_create_with_puppet_class_name(
'puppet-proxy-id': session_puppet_enabled_proxy.id,
}
)
host_classes = session_puppet_enabled_sat.cli.target_sat.cli.Host.puppetclasses(
{'host': host['name']}
)
host_classes = session_puppet_enabled_sat.cli.Host.puppetclasses({'host': host['name']})
assert module_puppet_classes[0].name in [puppet['name'] for puppet in host_classes]


Expand Down Expand Up @@ -2623,21 +2619,17 @@ def test_positive_update_host_owner_and_verify_puppet_class_name(
'puppet-proxy-id': session_puppet_enabled_proxy.id,
}
)
host_classes = session_puppet_enabled_sat.cli.target_sat.cli.Host.puppetclasses(
{'host': host['name']}
)
host_classes = session_puppet_enabled_sat.cli.Host.puppetclasses({'host': host['name']})
assert module_puppet_classes[0].name in [puppet['name'] for puppet in host_classes]

session_puppet_enabled_sat.cli.target_sat.cli.Host.update(
session_puppet_enabled_sat.cli.Host.update(
{'id': host['id'], 'owner': module_puppet_user.login, 'owner-type': 'User'}
)
host = session_puppet_enabled_sat.cli.target_sat.cli.Host.info({'id': host['id']})
host = session_puppet_enabled_sat.cli.Host.info({'id': host['id']})
assert int(host['additional-info']['owner-id']) == module_puppet_user.id
assert host['additional-info']['owner-type'] == 'User'

host_classes = session_puppet_enabled_sat.cli.target_sat.cli.Host.puppetclasses(
{'host': host['name']}
)
host_classes = session_puppet_enabled_sat.cli.Host.puppetclasses({'host': host['name']})
assert module_puppet_classes[0].name in [puppet['name'] for puppet in host_classes]


Expand Down
Loading