Skip to content

Commit 1a0778e

Browse files
committed
Fix integration tests for 2.19
1 parent ce75a5a commit 1a0778e

File tree

3 files changed

+10
-10
lines changed
  • tests/integration/targets

3 files changed

+10
-10
lines changed

tests/integration/targets/vmware_cluster_info/tasks/main.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
name: ensure info are gathered for all clusters
2020
assert:
2121
that:
22-
- all_cluster_result.clusters
22+
- all_cluster_result.clusters | length > 0
2323
- not all_cluster_result.changed
2424

2525
- name: ensure info are all defined
@@ -72,7 +72,7 @@
7272
name: Ensure info are gathered for the given cluster
7373
assert:
7474
that:
75-
- cluster_result.clusters
75+
- cluster_result.clusters | length > 0
7676
- not cluster_result.changed
7777

7878
- <<: *vc_cluster_data
@@ -99,7 +99,7 @@
9999
- name: Ensure info are gathered for all clusters with properteis
100100
assert:
101101
that:
102-
- all_cluster_result.clusters
102+
- all_cluster_result.clusters | length > 0
103103
- all_cluster_result.clusters[item].name == item
104104
- all_cluster_result.clusters[item].configuration.dasConfig.enabled is defined
105105
- all_cluster_result.clusters[item].summary.totalCpu is defined
@@ -123,7 +123,7 @@
123123
- name: Ensure info are gathered for the given cluster with properties
124124
assert:
125125
that:
126-
- cluster_result.clusters
126+
- cluster_result.clusters | length > 0
127127
- cluster_result.clusters[item].name == item
128128
- cluster_result.clusters[item].configuration.dasConfig.enabled is defined
129129
- cluster_result.clusters[item].summary.totalCpu is defined
@@ -191,4 +191,4 @@
191191
- name: "Ensure URL-encoded cluster name"
192192
assert:
193193
that:
194-
- all_cluster_result.clusters['Cluster/\%']
194+
- all_cluster_result.clusters['Cluster/\%'] is truthy

tests/integration/targets/vmware_datacenter_info/tasks/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- name: Ensure datacenter is present
2020
assert:
2121
that:
22-
- dc_result.datacenter_info
22+
- dc_result.datacenter_info | length > 0
2323

2424
- name: Gather information about all datacenter in check mode
2525
vmware_datacenter_info:
@@ -36,7 +36,7 @@
3636
- name: Ensure datacenter is present
3737
assert:
3838
that:
39-
- dc_result.datacenter_info
39+
- dc_result.datacenter_info | length > 0
4040

4141
- name: Gather information about particular datacenter
4242
vmware_datacenter_info:
@@ -53,7 +53,7 @@
5353
- name: Ensure datacenter is present
5454
assert:
5555
that:
56-
- dc_result.datacenter_info
56+
- dc_result.datacenter_info | length > 0
5757

5858
- name: Gather information about particular datacenter in check mode
5959
vmware_datacenter_info:
@@ -71,4 +71,4 @@
7171
- name: Ensure datacenter is present
7272
assert:
7373
that:
74-
- dc_result.datacenter_info
74+
- dc_result.datacenter_info | length > 0

tests/integration/targets/vmware_dvs_portgroup_info/tasks/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
assert:
6565
that:
6666
- >-
67-
dvs_results.dvs_portgroup_info.{{ dvswitch1 }}
67+
dvs_results.dvs_portgroup_info['{{ dvswitch1 }}']
6868
| map(attribute='portgroup_name')
6969
| select('==', 'dvportgroup\/%')
7070
| list

0 commit comments

Comments
 (0)