|
187 | 187 | controller_host: "{{ controller_hostname }}"
|
188 | 188 | validate_certs: "{{ controller_validate_certs }}"
|
189 | 189 | ignore_errors: true # noqa ignore-errors
|
190 |
| - |
191 |
| - - name: "Get the organization ID" |
192 |
| - ansible.builtin.set_fact: |
193 |
| - controller_organization_id: "{{ lookup(controller_api_plugin, 'organizations', query_params={'name': 'Default'}, host=controller_hostname, username=controller_username, password=controller_password, verify_ssl=false) }}" |
194 |
| - |
195 |
| - - name: "Set empty lists for testing" |
196 |
| - ansible.builtin.set_fact: |
197 |
| - controller_api_results: [] |
198 |
| - differential_test_items: [] |
199 |
| - |
200 |
| - - name: "Error out on empty list" |
201 |
| - ansible.builtin.set_fact: |
202 |
| - error_empty_diff: "{{ query('controller_object_diff', api_list=controller_api_results, compare_list=differential_test_items, warn_on_empty_api=false) }}" |
203 |
| - ignore_errors: true |
204 |
| - register: error_results |
205 |
| - |
206 |
| - - name: "Warn out on empty list" |
207 |
| - ansible.builtin.set_fact: |
208 |
| - warn_empty_diff: "{{ query('controller_object_diff', api_list=controller_api_results, compare_list=differential_test_items) }}" |
209 |
| - register: warn_results |
210 |
| - |
211 |
| - - name: "Assert that the empty list error correctly" |
212 |
| - ansible.builtin.assert: |
213 |
| - that: |
214 |
| - - error_empty_diff is not defined |
215 |
| - - warn_empty_diff | length == 0 |
216 |
| - - "'Unable to find items in api_list' in error_results.msg" |
217 |
| - |
218 |
| - - name: Differential Testing |
219 |
| - ansible.builtin.include_tasks: "./tasks/differential.yml" |
220 |
| - loop: "{{ differential_items }}" |
221 |
| - loop_control: |
222 |
| - loop_var: differential_item |
223 | 190 | ...
|
0 commit comments