2020-03-09 10:11:07 +01:00
|
|
|
# state=present
|
|
|
|
|
|
|
|
- name: Test addition - {{ method }}
|
|
|
|
flatpak_remote:
|
|
|
|
name: flatpak-test
|
|
|
|
flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
|
|
|
|
state: present
|
|
|
|
method: "{{ method }}"
|
|
|
|
register: addition_result
|
|
|
|
|
|
|
|
- name: Verify addition test result - {{ method }}
|
|
|
|
assert:
|
|
|
|
that:
|
2021-05-22 13:51:36 +02:00
|
|
|
- addition_result is changed
|
2020-06-26 08:31:53 +02:00
|
|
|
msg: "state=present shall add flatpak when absent"
|
2020-03-09 10:11:07 +01:00
|
|
|
|
|
|
|
- name: Test idempotency of addition - {{ method }}
|
|
|
|
flatpak_remote:
|
|
|
|
name: flatpak-test
|
|
|
|
flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
|
|
|
|
state: present
|
|
|
|
method: "{{ method }}"
|
|
|
|
register: double_addition_result
|
|
|
|
|
|
|
|
- name: Verify idempotency of addition test result - {{ method }}
|
|
|
|
assert:
|
|
|
|
that:
|
2021-05-22 13:51:36 +02:00
|
|
|
- double_addition_result is not changed
|
2020-03-09 10:11:07 +01:00
|
|
|
msg: "state=present shall not do anything when flatpak is already present"
|
|
|
|
|
|
|
|
- name: Test updating remote url does not do anything - {{ method }}
|
|
|
|
flatpak_remote:
|
|
|
|
name: flatpak-test
|
|
|
|
flatpakrepo_url: https://a.different/repo.flatpakrepo
|
|
|
|
state: present
|
|
|
|
method: "{{ method }}"
|
|
|
|
register: url_update_result
|
|
|
|
|
|
|
|
- name: Verify updating remote url does not do anything - {{ method }}
|
|
|
|
assert:
|
|
|
|
that:
|
2021-05-22 13:51:36 +02:00
|
|
|
- url_update_result is not changed
|
2020-03-09 10:11:07 +01:00
|
|
|
msg: "Trying to update the URL of an existing flatpak remote shall not do anything"
|
|
|
|
|
|
|
|
|
|
|
|
# state=absent
|
|
|
|
|
|
|
|
- name: Test removal - {{ method }}
|
|
|
|
flatpak_remote:
|
|
|
|
name: flatpak-test
|
|
|
|
state: absent
|
|
|
|
method: "{{ method }}"
|
|
|
|
register: removal_result
|
|
|
|
|
|
|
|
- name: Verify removal test result - {{ method }}
|
|
|
|
assert:
|
|
|
|
that:
|
2021-05-22 13:51:36 +02:00
|
|
|
- removal_result is changed
|
2020-03-09 10:11:07 +01:00
|
|
|
msg: "state=absent shall remove flatpak when present"
|
|
|
|
|
|
|
|
- name: Test idempotency of removal - {{ method }}
|
|
|
|
flatpak_remote:
|
|
|
|
name: flatpak-test
|
|
|
|
state: absent
|
|
|
|
method: "{{ method }}"
|
|
|
|
register: double_removal_result
|
|
|
|
|
|
|
|
- name: Verify idempotency of removal test result - {{ method }}
|
|
|
|
assert:
|
|
|
|
that:
|
2021-05-22 13:51:36 +02:00
|
|
|
- double_removal_result is not changed
|
2020-03-09 10:11:07 +01:00
|
|
|
msg: "state=absent shall not do anything when flatpak is not present"
|