diff --git a/tests/foreman/api/test_computeresource_vmware.py b/tests/foreman/api/test_computeresource_vmware.py index 69b499c897..fe158de6c7 100644 --- a/tests/foreman/api/test_computeresource_vmware.py +++ b/tests/foreman/api/test_computeresource_vmware.py @@ -58,7 +58,7 @@ def test_positive_provision_end_to_end( :CaseImportance: Critical - :Verifies: SAT-18721, SAT-23558, SAT-25810 + :Verifies: SAT-18721, SAT-23558, SAT-25810, SAT-25339 :customerscenario: true @@ -128,9 +128,15 @@ def test_positive_provision_end_to_end( request.addfinalizer(lambda: sat.provisioning_cleanup(host.name)) assert host.name == f'{name}.{module_provisioning_sat.domain.name}' - # check if vm is created on vmware + # Check if VM is created on VMware assert vmwareclient.does_vm_exist(host.name) is True - # check the build status + + # Check if virtual TPM device is added to created VM (only for UEFI) + if pxe_loader.vm_firmware != 'bios': + vm = vmwareclient.get_vm(host.name) + assert 'VirtualTPM' in vm.get_virtual_device_type_names() + + # Check the build status wait_for( lambda: host.read().build_status_label != 'Pending installation', timeout=1500, diff --git a/tests/foreman/ui/test_computeresource_vmware.py b/tests/foreman/ui/test_computeresource_vmware.py index 51237df3a5..a23ca1b55e 100644 --- a/tests/foreman/ui/test_computeresource_vmware.py +++ b/tests/foreman/ui/test_computeresource_vmware.py @@ -562,6 +562,7 @@ def test_positive_virt_card(session, target_sat, module_location, module_org, vm def test_positive_provision_end_to_end( request, module_sca_manifest_org, + module_location, pxe_loader, module_vmware_cr, module_vmware_hostgroup, @@ -594,7 +595,7 @@ def test_positive_provision_end_to_end( """ SELECTED_ROLE = 'theforeman.foreman_scap_client' host_name = gen_string('alpha').lower() - guest_os_names = 'Red Hat Enterprise Linux 9 (64 bit)' + guest_os_names = 'Red Hat Enterprise Linux 8 (64 bit)' storage_data = {'storage': {'disks': [{'data_store': get_vmware_datastore_summary_string}]}} network_data = { 'network_interfaces': { @@ -603,8 +604,10 @@ def test_positive_provision_end_to_end( } } with target_sat.ui_session() as session: - session.organization.select(module_sca_manifest_org.name) 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( module_vmware_hostgroup.name, {'ansible_roles.resources': SELECTED_ROLE} )