2018-09-07 23:01:36 +02:00
|
|
|
# - Tests with absent flatpak remote -------------------------------------------
|
|
|
|
|
|
|
|
# state=present
|
|
|
|
|
|
|
|
- name: Test addition of absent flatpak remote (check mode)
|
|
|
|
flatpak_remote:
|
|
|
|
name: flatpak-test
|
2019-03-20 01:16:26 +01:00
|
|
|
flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
|
2018-09-07 23:01:36 +02:00
|
|
|
state: present
|
|
|
|
register: addition_result
|
|
|
|
check_mode: true
|
|
|
|
|
|
|
|
- name: Verify addition of absent flatpak remote test result (check mode)
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "addition_result.changed == true"
|
|
|
|
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)
|
|
|
|
flatpak_remote:
|
|
|
|
name: flatpak-test
|
2019-03-20 01:16:26 +01:00
|
|
|
flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
|
2018-09-07 23:01:36 +02:00
|
|
|
state: present
|
|
|
|
register: double_addition_result
|
|
|
|
check_mode: true
|
|
|
|
|
|
|
|
- name: >
|
|
|
|
Verify non-existent idempotency of addition of absent flatpak remote
|
|
|
|
test result (check mode)
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "double_addition_result.changed == true"
|
|
|
|
msg: |
|
|
|
|
Adding an absent flatpak remote a second time shall still mark module execution
|
|
|
|
as changed in check mode
|
|
|
|
|
|
|
|
# state=absent
|
|
|
|
|
|
|
|
- name: Test removal of absent flatpak remote not doing anything in check mode
|
|
|
|
flatpak_remote:
|
|
|
|
name: flatpak-test
|
|
|
|
state: absent
|
|
|
|
register: removal_result
|
|
|
|
check_mode: true
|
|
|
|
|
|
|
|
- name: Verify removal of absent flatpak remote test result (check mode)
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "removal_result.changed == false"
|
|
|
|
msg: "Removing an absent flatpak remote shall mark module execution as not changed"
|
|
|
|
|
|
|
|
|
|
|
|
# - Tests with present flatpak remote -------------------------------------------
|
|
|
|
|
|
|
|
# state=present
|
|
|
|
|
|
|
|
- name: Test addition of present flatpak remote (check mode)
|
|
|
|
flatpak_remote:
|
|
|
|
name: check-mode-test-remote
|
2019-03-20 01:16:26 +01:00
|
|
|
flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
|
2018-09-07 23:01:36 +02:00
|
|
|
state: present
|
|
|
|
register: addition_result
|
|
|
|
check_mode: true
|
|
|
|
|
|
|
|
- name: Verify addition of present flatpak remote test result (check mode)
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "addition_result.changed == false"
|
|
|
|
msg: "Adding a present flatpak remote shall mark module execution as not changed"
|
|
|
|
|
|
|
|
# state=absent
|
|
|
|
|
|
|
|
- name: Test removal of present flatpak remote not doing anything in check mode
|
|
|
|
flatpak_remote:
|
|
|
|
name: check-mode-test-remote
|
|
|
|
state: absent
|
|
|
|
register: removal_result
|
|
|
|
check_mode: true
|
|
|
|
|
|
|
|
- name: Verify removal of present flatpak remote test result (check mode)
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "removal_result.changed == true"
|
|
|
|
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)
|
|
|
|
flatpak_remote:
|
|
|
|
name: check-mode-test-remote
|
|
|
|
state: absent
|
|
|
|
register: double_removal_result
|
|
|
|
check_mode: true
|
|
|
|
|
|
|
|
- name: >
|
|
|
|
Verify non-existent idempotency of removal of present flatpak remote
|
|
|
|
test result (check mode)
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "double_removal_result.changed == true"
|
|
|
|
msg: |
|
|
|
|
Removing a present flatpak remote a second time shall still mark module execution
|
|
|
|
as changed in check mode
|