Skip to content

Commit

Permalink
fix in CR for import ansible role
Browse files Browse the repository at this point in the history
  • Loading branch information
amolpati30 committed Nov 15, 2024
1 parent 388a0ec commit 12bb3af
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/foreman/ui/test_computeresource_vmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ def _get_normalized_size(size):
return f'{size} {suffixes[suffix_index]}'


@pytest.fixture
def get_vmware_datastore_summary_string(vmware, vmwareclient):
def get_vmware_datastore_summary_string(vmwareclient):
"""Return the datastore string summary for data_store_name
For "Local-Ironforge" datastore the string looks Like:
Expand Down Expand Up @@ -576,7 +575,6 @@ def test_positive_provision_end_to_end(
vmwareclient,
target_sat,
module_provisioning_rhel_content,
get_vmware_datastore_summary_string,
):
"""Assign Ansible role to a Hostgroup and verify ansible role execution job is scheduled after a host is provisioned
Expand Down Expand Up @@ -607,9 +605,9 @@ def test_positive_provision_end_to_end(
'network': f'VLAN {settings.provisioning.vlan_id}',
}
}
proxy_id = target_sat.nailgun_smart_proxy.id
target_sat.api.AnsibleRoles().sync(data={'proxy_id': proxy_id, 'role_names': [SELECTED_ROLE]})
with target_sat.ui_session() as session:
session.ansibleroles.import_all_roles()
assert session.ansibleroles.import_all_roles() == session.ansibleroles.imported_roles_count
session.location.select(module_location.name)
session.organization.select(module_sca_manifest_org.name)
session.hostgroup.assign_role_to_hostgroup(
Expand Down Expand Up @@ -649,7 +647,9 @@ def test_positive_provision_end_to_end(
silent_failure=True,
handle_exception=True,
)
values = session.host_new.get_host_statuses(host_name)
values = session.host_new.get_host_statuses(
f'{host_name}.{module_vmware_hostgroup.domain.read().name}'
)
assert values['Build']['Status'] == 'Installed'
assert values['Execution']['Status'] == 'Last execution succeeded'

Expand Down

0 comments on commit 12bb3af

Please sign in to comment.