1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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
parent 3100c32a00
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

@ -174,7 +174,7 @@
- name: Test that the file modes were changed
assert:
that:
- "archive_02_gz_stat.changed == False "
- archive_02_gz_stat is not changed
- "archive_02_gz_stat.stat.mode == '0600'"
- "'archived' in archive_bz2_result_02"
- "{{ archive_bz2_result_02['archived']| length}} == 3"
@ -199,7 +199,7 @@
- name: Test that the file modes were changed
assert:
that:
- "archive_02_zip_stat.changed == False"
- archive_02_zip_stat is not changed
- "archive_02_zip_stat.stat.mode == '0600'"
- "'archived' in archive_zip_result_02"
- "{{ archive_zip_result_02['archived']| length}} == 3"
@ -224,7 +224,7 @@
- name: Test that the file modes were changed
assert:
that:
- "archive_02_bz2_stat.changed == False"
- archive_02_bz2_stat is not changed
- "archive_02_bz2_stat.stat.mode == '0600'"
- "'archived' in archive_bz2_result_02"
- "{{ archive_bz2_result_02['archived']| length}} == 3"
@ -248,7 +248,7 @@
- name: Test that the file modes were changed
assert:
that:
- "archive_02_xz_stat.changed == False"
- archive_02_xz_stat is not changed
- "archive_02_xz_stat.stat.mode == '0600'"
- "'archived' in archive_xz_result_02"
- "{{ archive_xz_result_02['archived']| length}} == 3"
@ -294,7 +294,7 @@
- name: Assert that nonascii tests succeeded
assert:
that:
- "nonascii_result_0.changed == true"
- nonascii_result_0 is changed
- "nonascii_stat0.stat.exists == true"
- name: remove nonascii test
@ -315,7 +315,7 @@
- name: Assert that nonascii tests succeeded
assert:
that:
- "nonascii_result_1.changed == true"
- nonascii_result_1 is changed
- "nonascii_stat_1.stat.exists == true"
- name: remove nonascii test
@ -336,7 +336,7 @@
- name: Assert that nonascii tests succeeded
assert:
that:
- "nonascii_result_1.changed == true"
- nonascii_result_1 is changed
- "nonascii_stat_1.stat.exists == true"
- name: remove nonascii test
@ -357,7 +357,7 @@
- name: Assert that nonascii tests succeeded
assert:
that:
- "nonascii_result_2.changed == true"
- nonascii_result_2 is changed
- "nonascii_stat_2.stat.exists == true"
- name: remove nonascii test

View file

@ -13,7 +13,7 @@
- name: Verify addition of absent flatpak test result (check mode)
assert:
that:
- "addition_result.changed == true"
- addition_result is changed
msg: "Adding an absent flatpak shall mark module execution as changed"
- name: Test non-existent idempotency of addition of absent flatpak (check mode)
@ -27,7 +27,7 @@
- name: Verify non-existent idempotency of addition of absent flatpak test result (check mode)
assert:
that:
- "double_addition_result.changed == true"
- double_addition_result is changed
msg: |
Adding an absent flatpak a second time shall still mark module execution
as changed in check mode
@ -44,7 +44,7 @@
- name: Verify removal of absent flatpak test result (check mode)
assert:
that:
- "removal_result.changed == false"
- removal_result is not changed
msg: "Removing an absent flatpak shall mark module execution as not changed"
# state=present with url on absent flatpak
@ -60,7 +60,7 @@
- name: Verify addition of absent flatpak with url test result (check mode)
assert:
that:
- "url_addition_result.changed == true"
- url_addition_result is changed
msg: "Adding an absent flatpak from URL shall mark module execution as changed"
- name: Test non-existent idempotency of addition of absent flatpak with url (check mode)
@ -76,7 +76,7 @@
result (check mode)
assert:
that:
- "double_url_addition_result.changed == true"
- double_url_addition_result is changed
msg: |
Adding an absent flatpak from URL a second time shall still mark module execution
as changed in check mode
@ -93,7 +93,7 @@
- name: Verify removal of absent flatpak with url test result (check mode)
assert:
that:
- "url_removal_result.changed == false"
- url_removal_result is not changed
msg: "Removing an absent flatpak shall mark module execution as not changed"
@ -112,7 +112,7 @@
- name: Verify addition test result of present flatpak (check mode)
assert:
that:
- "addition_present_result.changed == false"
- addition_present_result is not changed
msg: "Adding an present flatpak shall mark module execution as not changed"
# state=absent on present flatpak
@ -127,7 +127,7 @@
- name: Verify removal of present flatpak test result (check mode)
assert:
that:
- "removal_present_result.changed == true"
- removal_present_result is changed
msg: "Removing a present flatpak shall mark module execution as changed"
- name: Test non-existent idempotency of removal (check mode)
@ -140,7 +140,7 @@
- name: Verify non-existent idempotency of removal (check mode)
assert:
that:
- "double_removal_present_result.changed == true"
- double_removal_present_result is changed
msg: |
Removing a present flatpak a second time shall still mark module execution
as changed in check mode
@ -158,7 +158,7 @@
- name: Verify addition with url of present flatpak test result (check mode)
assert:
that:
- "url_addition_present_result.changed == false"
- url_addition_present_result is not changed
msg: "Adding a present flatpak from URL shall mark module execution as not changed"
# state=absent with url on present flatpak
@ -173,7 +173,7 @@
- name: Verify removal with url of present flatpak test result (check mode)
assert:
that:
- "url_removal_present_result.changed == true"
- url_removal_present_result is changed
msg: "Removing an absent flatpak shall mark module execution as not changed"
- name: Test non-existent idempotency of removal with url of present flatpak (check mode)
@ -189,5 +189,5 @@
flatpak test result (check mode)
assert:
that:
- "double_url_removal_present_result.changed == true"
- double_url_removal_present_result is changed
msg: Removing an absent flatpak a second time shall still mark module execution as changed

View file

@ -40,8 +40,8 @@
- name: Verify executable override test result
assert:
that:
- "executable_override_result.failed == true"
- "executable_override_result.changed == false"
- executable_override_result is failed
- executable_override_result is not changed
msg: "Specifying non-existing executable shall fail module execution"
- import_tasks: check_mode.yml

View file

@ -11,7 +11,7 @@
- name: Verify addition test result - {{ method }}
assert:
that:
- "addition_result.changed == true"
- addition_result is changed
msg: "state=present shall add flatpak when absent"
- name: Test idempotency of addition - {{ method }}
@ -25,7 +25,7 @@
- name: Verify idempotency of addition test result - {{ method }}
assert:
that:
- "double_addition_result.changed == false"
- double_addition_result is not changed
msg: "state=present shall not do anything when flatpak is already present"
# state=absent
@ -40,7 +40,7 @@
- name: Verify removal test result - {{ method }}
assert:
that:
- "removal_result.changed == true"
- removal_result is changed
msg: "state=absent shall remove flatpak when present"
- name: Test idempotency of removal - {{ method }}
@ -53,7 +53,7 @@
- name: Verify idempotency of removal test result - {{ method }}
assert:
that:
- "double_removal_result.changed == false"
- double_removal_result is not changed
msg: "state=absent shall not do anything when flatpak is not present"
# state=present with url as name
@ -69,7 +69,7 @@
- name: Verify addition test result - {{ method }}
assert:
that:
- "url_addition_result.changed == true"
- url_addition_result is changed
msg: "state=present with url as name shall add flatpak when absent"
- name: Test idempotency of addition with url - {{ method }}
@ -83,7 +83,7 @@
- name: Verify idempotency of addition with url test result - {{ method }}
assert:
that:
- "double_url_addition_result.changed == false"
- double_url_addition_result is not changed
msg: "state=present with url as name shall not do anything when flatpak is already present"
# state=absent with url as name
@ -98,7 +98,7 @@
- name: Verify removal test result - {{ method }}
assert:
that:
- "url_removal_result.changed == true"
- url_removal_result is changed
msg: "state=absent with url as name shall remove flatpak when present"
- name: Test idempotency of removal with url - {{ method }}
@ -111,5 +111,5 @@
- name: Verify idempotency of removal with url test result - {{ method }}
assert:
that:
- "double_url_removal_result.changed == false"
- double_url_removal_result is not changed
msg: "state=absent with url as name shall not do anything when flatpak is not present"

View file

@ -13,7 +13,7 @@
- name: Verify addition of absent flatpak remote test result (check mode)
assert:
that:
- "addition_result.changed == true"
- addition_result is changed
msg: "Adding an absent flatpak remote shall mark module execution as changed"
- name: Test non-existent idempotency of addition of absent flatpak remote (check mode)
@ -29,7 +29,7 @@
test result (check mode)
assert:
that:
- "double_addition_result.changed == true"
- double_addition_result is changed
msg: |
Adding an absent flatpak remote a second time shall still mark module execution
as changed in check mode
@ -46,7 +46,7 @@
- name: Verify removal of absent flatpak remote test result (check mode)
assert:
that:
- "removal_result.changed == false"
- removal_result is not changed
msg: "Removing an absent flatpak remote shall mark module execution as not changed"
@ -65,7 +65,7 @@
- name: Verify addition of present flatpak remote test result (check mode)
assert:
that:
- "addition_result.changed == false"
- addition_result is not changed
msg: "Adding a present flatpak remote shall mark module execution as not changed"
# state=absent
@ -80,7 +80,7 @@
- name: Verify removal of present flatpak remote test result (check mode)
assert:
that:
- "removal_result.changed == true"
- removal_result is changed
msg: "Removing a present flatpak remote shall mark module execution as changed"
- name: Test non-existent idempotency of removal of present flatpak remote (check mode)
@ -95,7 +95,7 @@
test result (check mode)
assert:
that:
- "double_removal_result.changed == true"
- double_removal_result is changed
msg: |
Removing a present flatpak remote a second time shall still mark module execution
as changed in check mode

View file

@ -40,8 +40,8 @@
- name: Verify executable override test result
assert:
that:
- "executable_override_result.failed == true"
- "executable_override_result.changed == false"
- executable_override_result is failed
- executable_override_result is not changed
msg: "Specifying non-existing executable shall fail module execution"
- import_tasks: check_mode.yml

View file

@ -11,7 +11,7 @@
- name: Verify addition test result - {{ method }}
assert:
that:
- "addition_result.changed == true"
- addition_result is changed
msg: "state=present shall add flatpak when absent"
- name: Test idempotency of addition - {{ method }}
@ -25,7 +25,7 @@
- name: Verify idempotency of addition test result - {{ method }}
assert:
that:
- "double_addition_result.changed == false"
- double_addition_result is not changed
msg: "state=present shall not do anything when flatpak is already present"
- name: Test updating remote url does not do anything - {{ method }}
@ -39,7 +39,7 @@
- name: Verify updating remote url does not do anything - {{ method }}
assert:
that:
- "url_update_result.changed == false"
- url_update_result is not changed
msg: "Trying to update the URL of an existing flatpak remote shall not do anything"
@ -55,7 +55,7 @@
- name: Verify removal test result - {{ method }}
assert:
that:
- "removal_result.changed == true"
- removal_result is changed
msg: "state=absent shall remove flatpak when present"
- name: Test idempotency of removal - {{ method }}
@ -68,5 +68,5 @@
- name: Verify idempotency of removal test result - {{ method }}
assert:
that:
- "double_removal_result.changed == false"
- double_removal_result is not changed
msg: "state=absent shall not do anything when flatpak is not present"

View file

@ -17,9 +17,9 @@
- name: assert set changed and value is correct
assert:
that:
- set_result.changed == true
- set_result is changed
- set_result.diff.before == "\n"
- set_result.diff.after == option_value + "\n"
- get_result.changed == false
- get_result is not changed
- get_result.config_value == option_value
...

View file

@ -19,9 +19,9 @@
- name: assert set changed and value is correct with state=present
assert:
that:
- set_result.changed == true
- set_result is changed
- set_result.diff.before == "\n"
- set_result.diff.after == option_value + "\n"
- get_result.changed == false
- get_result is not changed
- get_result.config_value == option_value
...

View file

@ -18,7 +18,7 @@
- name: assert unset changed and deleted value
assert:
that:
- unset_result.changed == true
- unset_result is changed
- unset_result.diff.before == option_value + "\n"
- unset_result.diff.after == "\n"
- get_result.config_value == ''

View file

@ -18,7 +18,7 @@
- name: assert unset changed but dit not delete value
assert:
that:
- unset_result.changed == true
- unset_result is changed
- unset_result.diff.before == option_value + "\n"
- unset_result.diff.after == "\n"
- get_result.config_value == option_value

View file

@ -17,7 +17,7 @@
- name: assert unsetting didn't change
assert:
that:
- unset_result.changed == false
- unset_result is not changed
- unset_result.msg == 'no setting to unset'
- get_result.config_value == ''
...

View file

@ -17,7 +17,7 @@
- name: assert unset changed and deleted value
assert:
that:
- unset_result.changed == true
- unset_result is changed
- unset_result.diff.before == option_value + "\n"
- unset_result.diff.after == "\n"
- get_result.config_value == ''

View file

@ -18,8 +18,8 @@
- assert:
that:
- "{{ get_status_0002.changed == True }}"
- "{{ get_status_0002.issue_status == 'closed' }}"
- get_status_0002 is changed
- get_status_0002.issue_status == 'closed'
- name: Check if GitHub issue is closed or not
github_issue:
@ -32,6 +32,6 @@
- assert:
that:
- "{{ get_status_0003.changed == False }}"
- "{{ get_status_0003.failed == True }}"
- "{{ 'Failed' in get_status_0003.msg }}"
- get_status_0003 is not changed
- get_status_0003 is failed
- "'Failed' in get_status_0003.msg"

View file

@ -167,8 +167,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#----------------------------------------------------------
- name: delete a instance (check mode)
hwc_ecs_instance:
@ -277,8 +277,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#---------------------------------------------------------
# Post-test teardown
- name: delete a disk

View file

@ -50,8 +50,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#----------------------------------------------------------
- name: delete a disk (check mode)
hwc_evs_disk:
@ -92,7 +92,7 @@
- name: assert changed is false
assert:
that:
- result.changed == false
- result is not changed
# ----------------------------------------------------------------------------
- name: delete a disk that does not exist
hwc_evs_disk:
@ -105,5 +105,5 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed

View file

@ -62,8 +62,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#----------------------------------------------------------
- name: delete a vpc
hwc_network_vpc:
@ -97,5 +97,5 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed

View file

@ -44,8 +44,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#----------------------------------------------------------
- name: delete a smn topic
hwc_smn_topic:
@ -77,5 +77,5 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed

View file

@ -96,8 +96,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#----------------------------------------------------------
- name: delete a eip (check mode)
hwc_vpc_eip:
@ -159,8 +159,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#---------------------------------------------------------
# Post-test teardown
- name: delete a port

View file

@ -78,8 +78,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#----------------------------------------------------------
- name: delete a peering connect (check mode)
hwc_vpc_peering_connect:
@ -133,8 +133,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#---------------------------------------------------------
# Post-test teardown
- name: delete a vpc

View file

@ -69,8 +69,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#----------------------------------------------------------
- name: delete a port (check mode)
hwc_vpc_port:
@ -116,8 +116,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#---------------------------------------------------------
# Post-test teardown
- name: delete a subnet

View file

@ -70,8 +70,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#----------------------------------------------------------
- name: delete a private ip (check mode)
hwc_vpc_private_ip:
@ -117,8 +117,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#---------------------------------------------------------
# Post-test teardown
- name: delete a subnet

View file

@ -81,8 +81,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#----------------------------------------------------------
- name: delete a route (check mode)
hwc_vpc_route:
@ -127,8 +127,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#---------------------------------------------------------
# Post-test teardown
- name: delete a peering connect

View file

@ -51,8 +51,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#----------------------------------------------------------
- name: delete a security group (check mode)
hwc_vpc_security_group:
@ -83,5 +83,5 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed

View file

@ -85,8 +85,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#----------------------------------------------------------
- name: delete a security group rule (check mode)
hwc_vpc_security_group_rule:
@ -151,8 +151,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#---------------------------------------------------------
# Post-test teardown
- name: delete a security group

View file

@ -77,8 +77,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#----------------------------------------------------------
- name: delete a subnet (check mode)
hwc_vpc_subnet:
@ -136,8 +136,8 @@
- name: assert changed is false
assert:
that:
- result.failed == 0
- result.changed == false
- result is not failed
- result is not changed
#---------------------------------------------------------
# Post-test teardown
- name: delete a vpc

View file

@ -13,7 +13,7 @@
- name: Check that admin user adding succeeds with a change
assert:
that:
- add_admin_user.changed == true
- add_admin_user is changed
- name: Test add admin user
block:
@ -24,7 +24,7 @@
- name: Check that admin user adding succeeds with a change
assert:
that:
- add_admin_user.changed == true
- add_admin_user is changed
- name: Test add admin user idempotence
block:
@ -35,7 +35,7 @@
- name: Check that admin user adding succeeds without a change
assert:
that:
- add_admin_user.changed == false
- add_admin_user is not changed
- name: Enable authentication and restart service
block:
@ -58,7 +58,7 @@
- name: Check that adding user with enabled authentication succeeds with a change
assert:
that:
- add_user_with_auth_enabled.changed == true
- add_user_with_auth_enabled is changed
- name: Test add user when authentication enabled
block:
@ -69,7 +69,7 @@
- name: Check that adding user with enabled authentication succeeds with a change
assert:
that:
- add_user_with_auth_enabled.changed == true
- add_user_with_auth_enabled is changed
- name: Test add user when authentication enabled idempotence
block:
@ -80,7 +80,7 @@
- name: Check that adding same user succeeds without a change
assert:
that:
- same_user.changed == false
- same_user is not changed
- name: Test change user password in check mode
block:
@ -92,7 +92,7 @@
- name: Check that password changing succeeds with a change
assert:
that:
- change_password.changed == true
- change_password is changed
- name: Test change user password
block:
@ -103,7 +103,7 @@
- name: Check that password changing succeeds with a change
assert:
that:
- change_password.changed == true
- change_password is changed
- name: Test remove user in check mode
block:
@ -115,7 +115,7 @@
- name: Check that removing user succeeds with a change
assert:
that:
- remove_user.changed == true
- remove_user is changed
- name: Test remove user
block:
@ -126,7 +126,7 @@
- name: Check that removing user succeeds with a change
assert:
that:
- remove_user.changed == true
- remove_user is changed
- name: Test remove user idempotence
block:
@ -137,4 +137,4 @@
- name: Check that removing user succeeds without a change
assert:
that:
- remove_user.changed == false
- remove_user is not changed

View file

@ -41,6 +41,6 @@
- name: check if task was successful
assert:
that:
- "{{ external_ip.changed == false }}"
- "{{ external_ip['ansible_facts'] is defined }}"
- "{{ external_ip['ansible_facts']['ipify_public_ip'] is defined }}"
- external_ip is not changed
- external_ip.ansible_facts is defined
- external_ip.ansible_facts.ipify_public_ip is defined

View file

@ -35,7 +35,7 @@
- debug: var=iso_file
- assert:
that:
- iso_result.changed == True
- iso_result is changed
- iso_file.stat.exists == False
- name: Create iso file with a specified file
@ -54,7 +54,7 @@
- assert:
that:
- iso_result.changed == True
- iso_result is changed
- iso_file.stat.exists == True
- name: Create iso file with a specified file and folder
@ -74,7 +74,7 @@
- assert:
that:
- iso_result.changed == True
- iso_result is changed
- iso_file.stat.exists == True
- name: Create iso file with volume identification string
@ -93,7 +93,7 @@
- assert:
that:
- iso_result.changed == True
- iso_result is changed
- iso_file.stat.exists == True
- name: Create iso file with Rock Ridge extention
@ -112,7 +112,7 @@
- assert:
that:
- iso_result.changed == True
- iso_result is changed
- iso_file.stat.exists == True
- name: Create iso file with Joliet extention
@ -131,7 +131,7 @@
- assert:
that:
- iso_result.changed == True
- iso_result is changed
- iso_file.stat.exists == True
- name: Create iso file with UDF enabled
@ -150,5 +150,5 @@
- assert:
that:
- iso_result.changed == True
- iso_result is changed
- iso_file.stat.exists == True

View file

@ -28,7 +28,7 @@
- assert:
that:
- iso_extract_test0 is changed == true
- iso_extract_test0 is changed
- name: Extract the iso again
iso_extract:
@ -42,11 +42,11 @@
- name: Test iso_extract_test0_again (normal mode)
assert:
that:
- iso_extract_test0_again is changed == false
- iso_extract_test0_again is not changed
when: not in_check_mode
- name: Test iso_extract_test0_again (check-mode)
assert:
that:
- iso_extract_test0_again is changed == true
- iso_extract_test0_again is changed
when: in_check_mode

View file

@ -177,7 +177,7 @@
- name: "assert test_{{test_number}} worked"
assert:
that:
- result.changed == false
- result is not changed
# HOST DISABLEMENT

View file

@ -40,7 +40,7 @@
- assert:
that:
- "'changed' in sync_result"
- "sync_result.changed == true"
- sync_result is changed
- "'cmd' in sync_result"
- "'rsync' in sync_result.cmd"
- "'msg' in sync_result"
@ -63,7 +63,7 @@
- assert:
that:
- "sync_result.changed == False"
- sync_result is not changed
- name: cleanup old files
file:

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

@ -27,6 +27,6 @@
- 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
@ -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