Massive adjustment in integration tests for changed and failed (#2577)

* Replaced ".changed ==" with "is [not] changed". Same for failed

* Mr Quote refused to go
This commit is contained in:
Alexei Znamensky 2021-05-22 23:51:36 +12:00 committed by GitHub
commit d7e55db99b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 220 additions and 220 deletions

View file

@ -24,6 +24,6 @@
- name: Test expected result
assert:
that:
- add_children_elements_unicode.changed == true
- comparison.changed == false # identical
- add_children_elements_unicode is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-children-elements-unicode.xml /tmp/ansible-xml-beers.xml

View file

@ -24,6 +24,6 @@
- name: Test expected result
assert:
that:
- add_children_elements.changed == true
- comparison.changed == false # identical
- add_children_elements is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-children-elements.xml /tmp/ansible-xml-beers.xml

View file

@ -23,6 +23,6 @@
- name: Test expected result
assert:
that:
- add_children_from_groupvars.changed == true
- comparison.changed == false # identical
- add_children_from_groupvars is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-children-from-groupvars.xml /tmp/ansible-xml-beers.xml

View file

@ -28,5 +28,5 @@
- name: Test expected result
assert:
that:
- add_children_insertafter.changed == true
- comparison.changed == false # identical
- add_children_insertafter is changed
- comparison is not changed # identical

View file

@ -28,5 +28,5 @@
- name: Test expected result
assert:
that:
- add_children_insertbefore.changed == true
- comparison.changed == false # identical
- add_children_insertbefore is changed
- comparison is not changed # identical

View file

@ -26,6 +26,6 @@
- name: Test expected result
assert:
that:
- add_children_with_attributes_unicode.changed == true
- comparison.changed == false # identical
- add_children_with_attributes_unicode is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-children-with-attributes-unicode.xml /tmp/ansible-xml-beers.xml

View file

@ -29,7 +29,7 @@
- name: Test expected result
assert:
that:
- add_children_with_attributes.changed == true
- comparison.changed == false # identical
- add_children_with_attributes is changed
- comparison is not changed # identical
when: lxml_predictable_attribute_order
#command: diff -u {{ role_path }}/results/test-add-children-with-attributes.xml /tmp/ansible-xml-beers.xml

View file

@ -108,7 +108,7 @@
- name: Test expected result
assert:
that:
- comparison.changed == false # identical
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-element-implicitly.yml /tmp/ansible-xml-beers-implicit.xml

View file

@ -21,12 +21,12 @@
src: results/test-add-namespaced-children-elements.xml
dest: /tmp/ansible-xml-namespaced-beers.xml
check_mode: yes
diff: yes
diff: yes
register: comparison
- name: Test expected result
assert:
that:
- add_namespaced_children_elements.changed == true
- comparison.changed == false # identical
- add_namespaced_children_elements is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-namespaced-children-elements.xml /tmp/ansible-xml-namespaced-beers.xml

View file

@ -25,6 +25,6 @@
- name: Test expected result
assert:
that:
- children_elements.changed == true
- comparison.changed == false # identical
- children_elements is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-add-children-elements.xml /tmp/ansible-xml-beers.xml

View file

@ -15,5 +15,5 @@
- name: Test expected result
assert:
that:
- beers.changed == false
- beers is not changed
- beers.count == 2

View file

@ -15,5 +15,5 @@
- name: Test expected result
assert:
that:
- beers.changed == false
- beers is not changed
- beers.count == 3

View file

@ -15,7 +15,7 @@
- name: Test expected result
assert:
that:
- get_element_attribute.changed == false
- get_element_attribute is not changed
- get_element_attribute.matches[0]['rating'] is defined and get_element_attribute.matches[0]['rating']['subjective'] == 'да'
- name: Get element text
@ -28,5 +28,5 @@
- name: Test expected result
assert:
that:
- get_element_text.changed == false
- get_element_text is not changed
- get_element_text.matches[0]['rating'] == 'десять'

View file

@ -15,7 +15,7 @@
- name: Test expected result
assert:
that:
- get_element_attribute.changed == false
- get_element_attribute is not changed
- get_element_attribute.matches[0]['rating'] is defined
- get_element_attribute.matches[0]['rating']['subjective'] == 'true'
@ -43,5 +43,5 @@
- name: Test expected result
assert:
that:
- get_element_text.changed == false
- get_element_text is not changed
- get_element_text.matches[0]['rating'] == '10'

View file

@ -18,5 +18,5 @@
- name: Test expected result
assert:
that:
- module_output.changed == false
- module_output.failed == true
- module_output is not changed
- module_output is failed

View file

@ -24,6 +24,6 @@
- name: Test expected result
assert:
that:
- pretty_print_only.changed == true
- comparison.changed == false # identical
- pretty_print_only is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-pretty-print-only.xml /tmp/ansible-xml-beers.xml

View file

@ -25,6 +25,6 @@
- name: Test expected result
assert:
that:
- pretty_print.changed == true
- comparison.changed == false # identical
- pretty_print is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-pretty-print.xml /tmp/ansible-xml-beers.xml

View file

@ -23,6 +23,6 @@
- name: Test expected result
assert:
that:
- remove_attribute.changed == false
- comparison.changed == false # identical
- remove_attribute is not changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-remove-attribute.xml /tmp/ansible-xml-beers.xml

View file

@ -23,6 +23,6 @@
- name: Test expected result
assert:
that:
- remove_attribute.changed == true
- comparison.changed == false # identical
- remove_attribute is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-remove-attribute.xml /tmp/ansible-xml-beers.xml

View file

@ -23,6 +23,6 @@
- name: Test expected result
assert:
that:
- remove_element.changed == false
- comparison.changed == false # identical
- remove_element is not changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-remove-element.xml /tmp/ansible-xml-beers.xml

View file

@ -23,6 +23,6 @@
- name: Test expected result
assert:
that:
- remove_element.changed == true
- comparison.changed == false # identical
- remove_element is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-remove-element.xml /tmp/ansible-xml-beers.xml

View file

@ -28,6 +28,6 @@
- name: Test expected result
assert:
that:
- remove_namespaced_attribute.changed == false
- comparison.changed == false # identical
- remove_namespaced_attribute is not changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-remove-namespaced-attribute.xml /tmp/ansible-xml-namespaced-beers.xml

View file

@ -28,6 +28,6 @@
- name: Test expected result
assert:
that:
- remove_namespaced_attribute.changed == true
- comparison.changed == false # identical
- remove_namespaced_attribute is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-remove-namespaced-attribute.xml /tmp/ansible-xml-namespaced-beers.xml

View file

@ -28,6 +28,6 @@
- name: Test expected result
assert:
that:
- remove_namespaced_element.changed == false
- comparison.changed == false # identical
- remove_namespaced_element is not changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-remove-element.xml /tmp/ansible-xml-namespaced-beers.xml

View file

@ -28,6 +28,6 @@
- name: Test expected result
assert:
that:
- remove_namespaced_element.changed == true
- comparison.changed == false # identical
- remove_namespaced_element is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-remove-element.xml /tmp/ansible-xml-namespaced-beers.xml

View file

@ -24,6 +24,6 @@
- name: Test expected result
assert:
that:
- set_attribute_value_unicode.changed == true
- comparison.changed == false # identical
- set_attribute_value_unicode is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-set-attribute-value-unicode.xml /tmp/ansible-xml-beers.xml

View file

@ -24,6 +24,6 @@
- name: Test expected result
assert:
that:
- set_attribute_value.changed == true
- comparison.changed == false # identical
- set_attribute_value is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-set-attribute-value.xml /tmp/ansible-xml-beers.xml

View file

@ -47,8 +47,8 @@
- name: Test expected result
assert:
that:
- set_children_elements_level.changed == true
- comparison.changed == false # identical
- set_children_elements_level is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-set-children-elements-level.xml /tmp/ansible-xml-beers.xml
@ -70,5 +70,5 @@
- name: Test expected result
assert:
that:
- set_children_again.changed == false
- comparison.changed == false # identical
- set_children_again is not changed
- comparison is not changed # identical

View file

@ -25,8 +25,8 @@
- name: Test expected result
assert:
that:
- set_children_elements_unicode.changed == true
- comparison.changed == false # identical
- set_children_elements_unicode is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-set-children-elements-unicode.xml /tmp/ansible-xml-beers.xml
@ -41,6 +41,6 @@
- name: Test expected result
assert:
that:
- set_children_again.changed == false
- comparison.changed == false # identical
- set_children_again is not changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-set-children-elements-unicode.xml /tmp/ansible-xml-beers.xml

View file

@ -25,8 +25,8 @@
- name: Test expected result
assert:
that:
- set_children_elements.changed == true
- comparison.changed == false # identical
- set_children_elements is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-set-children-elements.xml /tmp/ansible-xml-beers.xml
@ -48,6 +48,6 @@
- name: Test expected result
assert:
that:
- set_children_again.changed == false
- comparison.changed == false # identical
- set_children_again is not changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-set-children-elements.xml /tmp/ansible-xml-beers.xml

View file

@ -23,6 +23,6 @@
- name: Test expected result
assert:
that:
- set_element_value_empty.changed == true
- comparison.changed == false # identical
- set_element_value_empty is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-set-element-value-empty.xml /tmp/ansible-xml-beers.xml

View file

@ -37,7 +37,7 @@
- name: Test expected result
assert:
that:
- set_element_first_run.changed == true
- set_element_second_run.changed == false
- comparison.changed == false # identical
- set_element_first_run is changed
- set_element_second_run is not changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-set-element-value-unicode.xml /tmp/ansible-xml-beers.xml

View file

@ -37,7 +37,7 @@
- name: Test expected result
assert:
that:
- set_element_first_run.changed == true
- set_element_second_run.changed == false
- comparison.changed == false # identical
- set_element_first_run is changed
- set_element_second_run is not changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-set-element-value.xml /tmp/ansible-xml-beers.xml

View file

@ -29,6 +29,6 @@
- name: Test expected result
assert:
that:
- set_namespaced_attribute_value.changed == true
- comparison.changed == false # identical
- set_namespaced_attribute_value is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-set-namespaced-attribute-value.xml /tmp/ansible-xml-namespaced-beers.xml

View file

@ -52,6 +52,6 @@
- name: Test expected result
assert:
that:
- set_children_again.changed == false # idempotency
- set_namespaced_attribute_value.changed == true
- comparison.changed == false # identical
- set_children_again is not changed # idempotency
- set_namespaced_attribute_value is changed
- comparison is not changed # identical

View file

@ -41,6 +41,6 @@
- name: Test expected result
assert:
that:
- set_element_first_run.changed == true
- set_element_second_run.changed == false
- comparison.changed == false # identical
- set_element_first_run is changed
- set_element_second_run is not changed
- comparison is not changed # identical

View file

@ -25,8 +25,8 @@
- name: Test expected result
assert:
that:
- xmlresponse.changed == false
- comparison.changed == false # identical
- xmlresponse is not changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-pretty-print-only.xml /tmp/ansible-xml-beers.xml
@ -49,8 +49,8 @@
- name: Test expected result
assert:
that:
- xmlresponse.changed == true
- comparison.changed == false # identical
- xmlresponse is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-pretty-print-only.xml /tmp/ansible-xml-beers.xml
@ -63,7 +63,7 @@
add_children:
- beer: Old Rasputin
register: xmlresponse_modification
- name: Compare to expected result
copy:
content: '{{ xmlresponse_modification.xmlstring }}'
@ -76,6 +76,6 @@
- name: Test expected result
assert:
that:
- xmlresponse_modification.changed == true
- comparison.changed == false # identical
- xmlresponse_modification is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-pretty-print.xml /tmp/ansible-xml-beers.xml