Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolenz committed Dec 4, 2023
1 parent 29513ab commit 44ce470
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions tests/integration/targets/vmware_about_info/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

- assert:
that:
- about.about_info["{{ item }}"] is defined
- about.about_info[item] is defined
with_items:
- api_type
- api_version
Expand All @@ -40,7 +40,7 @@

- assert:
that:
- about.about_info["{{ item }}"] is defined
- about.about_info[item] is defined
with_items:
- api_type
- api_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
- name: Check if we get correct associable datatype for {{ category_name }}
assert:
that:
- "'{{ expected_result }}' in {{ category_datatype }}"
- "expected_result in category_datatype"
4 changes: 2 additions & 2 deletions tests/integration/targets/vmware_dvs_portgroup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"

0 comments on commit 44ce470

Please sign in to comment.