diff --git a/tests/integration/targets/vmware_about_info/tasks/main.yml b/tests/integration/targets/vmware_about_info/tasks/main.yml index 94a9941d8..d5f09d6ef 100644 --- a/tests/integration/targets/vmware_about_info/tasks/main.yml +++ b/tests/integration/targets/vmware_about_info/tasks/main.yml @@ -15,7 +15,7 @@ - assert: that: - - about.about_info["{{ item }}"] is defined + - about.about_info[item] is defined with_items: - api_type - api_version @@ -40,7 +40,7 @@ - assert: that: - - about.about_info["{{ item }}"] is defined + - about.about_info[item] is defined with_items: - api_type - api_version diff --git a/tests/integration/targets/vmware_category/tasks/associable_obj_test.yml b/tests/integration/targets/vmware_category/tasks/associable_obj_test.yml index 3069f15dd..14c9c5d01 100644 --- a/tests/integration/targets/vmware_category/tasks/associable_obj_test.yml +++ b/tests/integration/targets/vmware_category/tasks/associable_obj_test.yml @@ -35,4 +35,4 @@ - name: Check if we get correct associable datatype for {{ category_name }} assert: that: - - "'{{ expected_result }}' in {{ category_datatype }}" \ No newline at end of file + - "expected_result in category_datatype" diff --git a/tests/integration/targets/vmware_dvs_portgroup/tasks/main.yml b/tests/integration/targets/vmware_dvs_portgroup/tasks/main.yml index 8e6119f45..8d45b2e28 100644 --- a/tests/integration/targets/vmware_dvs_portgroup/tasks/main.yml +++ b/tests/integration/targets/vmware_dvs_portgroup/tasks/main.yml @@ -407,7 +407,7 @@ assert: that: - not dvs_pg_result_0013.changed - - "'vlan_id range 1-4096 specified is incorrect. The valid vlan_id range is from 0 to 4094.' == '{{ dvs_pg_result_0013.msg }}'" + - "'vlan_id range 1-4096 specified is incorrect. The valid vlan_id range is from 0 to 4094.' == dvs_pg_result_0013.msg" - name: Change VLAN on basic VLAN portgroup community.vmware.vmware_dvs_portgroup: @@ -508,7 +508,7 @@ assert: that: - not dvs_pg_result_0018.changed - - "'No private vlan with id 10 in distributed vSwitch {{ dvswitch1 }}' == '{{ dvs_pg_result_0018.msg }}'" + - "'No private vlan with id 10 in distributed vSwitch {{ dvswitch1 }}' == dvs_pg_result_0018.msg" - name: Run tests and clean up block: diff --git a/tests/integration/targets/vmware_folder_info/tasks/main.yml b/tests/integration/targets/vmware_folder_info/tasks/main.yml index 51b53f4b5..f3816b0cf 100644 --- a/tests/integration/targets/vmware_folder_info/tasks/main.yml +++ b/tests/integration/targets/vmware_folder_info/tasks/main.yml @@ -31,7 +31,7 @@ - assert: that: - - "{{ item }} is defined" + - "item is defined" with_items: - folder_info_0001['folder_info'] - folder_info_0001['flat_folder_info'] diff --git a/tests/integration/targets/vmware_guest_controller/tasks/main.yml b/tests/integration/targets/vmware_guest_controller/tasks/main.yml index 790eb4a11..6ff9d522d 100644 --- a/tests/integration/targets/vmware_guest_controller/tasks/main.yml +++ b/tests/integration/targets/vmware_guest_controller/tasks/main.yml @@ -50,8 +50,8 @@ assert: that: - "add_disk_controller.changed == true" - - "{{ add_disk_controller.disk_controller_data.scsi | length | int }} == {{ scsi_num | int + 1 }}" - - "{{ add_disk_controller.disk_controller_data.sata | length | int }} == {{ sata_num | int + 1 }}" + - "add_disk_controller.disk_controller_data.scsi | length | int == scsi_num | int + 1" + - "add_disk_controller.disk_controller_data.sata | length | int == sata_num | int + 1" - name: delete specified disk controllers vmware_guest_controller: @@ -76,5 +76,5 @@ assert: that: - "del_disk_controller.changed == true" - - "{{ del_disk_controller.disk_controller_data.sata | length | int }} == {{ sata_num | int }}" - - "{{ del_disk_controller.disk_controller_data.scsi | length | int }} == {{ scsi_num | int }}" + - "del_disk_controller.disk_controller_data.sata | length | int == sata_num | int" + - "del_disk_controller.disk_controller_data.scsi | length | int == scsi_num | int" diff --git a/tests/integration/targets/vmware_guest_network/tasks/main.yml b/tests/integration/targets/vmware_guest_network/tasks/main.yml index cb70cbbd3..af84cabd7 100644 --- a/tests/integration/targets/vmware_guest_network/tasks/main.yml +++ b/tests/integration/targets/vmware_guest_network/tasks/main.yml @@ -89,7 +89,7 @@ assert: that: - add_netadapter is changed - - "{{ add_netadapter.results[1].network_info | length | int }} == {{ netadapter_num | int + 2 }}" + - "add_netadapter.results[1].network_info | length | int == netadapter_num | int + 2" - name: delete one specified network adapter community.vmware.vmware_guest_network: @@ -108,7 +108,7 @@ assert: that: - del_netadapter is changed - - "{{ del_netadapter.network_info | length | int }} == {{ netadapter_num | int + 1 }}" + - "del_netadapter.network_info | length | int == netadapter_num | int + 1" - name: get instance uuid of virtual machines community.vmware.vmware_guest_info: @@ -142,7 +142,7 @@ assert: that: - add_netadapter_instanceuuid is changed - - "{{ add_netadapter_instanceuuid.network_info | length | int }} == {{ netadapter_num | int + 2 }}" + - "add_netadapter_instanceuuid.network_info | length | int == netadapter_num | int + 2" - name: delete one specified network adapter community.vmware.vmware_guest_network: @@ -159,7 +159,7 @@ assert: that: - del_netadapter is changed - - "{{ del_netadapter.network_info | length | int }} == {{ netadapter_num | int + 1 }}" + - "del_netadapter.network_info | length | int == netadapter_num | int + 1" - name: delete again one specified network adapter (idempotency) community.vmware.vmware_guest_network: @@ -178,7 +178,7 @@ assert: that: - not (del_again_netadapter is changed) - - "{{ del_again_netadapter.network_info | length | int }} == {{ netadapter_num | int + 1 }}" + - "del_again_netadapter.network_info | length | int == netadapter_num | int + 1" - name: disable DirectPath I/O on a Vmxnet3 adapter community.vmware.vmware_guest_network: @@ -226,7 +226,7 @@ assert: that: - disc_netadapter is changed - - "{{ disc_netadapter.network_info[netadapter_num | int]['connected'] }} == false" + - "disc_netadapter.network_info[netadapter_num | int]['connected'] == false" - name: Check if network does not exists community.vmware.vmware_guest_network: @@ -396,7 +396,7 @@ - name: check that there's no adapters left assert: that: - - "{{ nic_info2.network_info | length | int }} == 0" + - "nic_info2.network_info | length | int == 0" - name: add new adapter(s) community.vmware.vmware_guest_network: @@ -412,7 +412,7 @@ - name: check that nic was created assert: that: - - "{{ new_nic.network_info | length | int }} > 0" + - "new_nic.network_info | length | int > 0" - name: add new PVRDMA adapter community.vmware.vmware_guest_network: @@ -429,7 +429,7 @@ - name: check that PVRDMA nic was created assert: that: - - "{{ new_nic_pvrdma.network_info | length | int }} == {{ new_nic.network_info | length | int + 1 }}" + - "new_nic_pvrdma.network_info | length | int == new_nic.network_info | length | int + 1" - name: remove PVRDMA adapter community.vmware.vmware_guest_network: @@ -445,7 +445,7 @@ - name: check that PVRDMA nic was removed assert: that: - - "{{ new_nic_pvrdma.network_info | length | int - 1 }} == {{ remove_nic_pvrdma.network_info | length | int }}" + - "new_nic_pvrdma.network_info | length | int - 1 == remove_nic_pvrdma.network_info | length | int" # https://github.com/ansible-collections/community.vmware/issues/204 - name: "Change a dvpg with in same DVS(integration test for 204)"