mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 23:21:22 -07:00
* reviving flatpack PR
* added changelog fragment
* adjusted integration tests per PR
* adjusted examples to use the full name of the module
* Use new local artifacts.
* Re-add StrictVersion import.
* Try to clean up PR.
* ...
* Use original name in installed/not installed list.
* More fixes.
* Work around flatpak bug.
* Fix bug I introduced.
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3997d5fcc8
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
b653a9a84a
commit
a6bffa274c
6 changed files with 220 additions and 38 deletions
|
@ -36,7 +36,9 @@
|
|||
|
||||
- name: Remove (if necessary) flatpak for testing check mode on absent flatpak
|
||||
flatpak:
|
||||
name: com.dummy.App1
|
||||
name:
|
||||
- com.dummy.App1
|
||||
- com.dummy.App3
|
||||
remote: dummy-remote
|
||||
state: absent
|
||||
no_dependencies: true
|
||||
|
|
|
@ -139,3 +139,146 @@
|
|||
that:
|
||||
- double_url_removal_result is not changed
|
||||
msg: "state=absent with url as name shall not do anything when flatpak is not present"
|
||||
|
||||
- name: Make sure flatpak is really gone - {{ method }}
|
||||
flatpak:
|
||||
name: com.dummy.App1
|
||||
state: absent
|
||||
method: "{{ method }}"
|
||||
no_dependencies: true
|
||||
|
||||
# state=present with list of packages
|
||||
|
||||
- name: Test addition with list - {{ method }}
|
||||
flatpak:
|
||||
name:
|
||||
- com.dummy.App1
|
||||
- http://127.0.0.1:8000/repo/com.dummy.App2.flatpakref
|
||||
remote: dummy-remote
|
||||
state: present
|
||||
method: "{{ method }}"
|
||||
no_dependencies: true
|
||||
register: addition_result
|
||||
|
||||
- name: Verify addition with list test result - {{ method }}
|
||||
assert:
|
||||
that:
|
||||
- addition_result is changed
|
||||
msg: "state=present shall add flatpak when absent"
|
||||
|
||||
- name: Test idempotency of addition with list - {{ method }}
|
||||
flatpak:
|
||||
name:
|
||||
- com.dummy.App1
|
||||
- http://127.0.0.1:8000/repo/com.dummy.App2.flatpakref
|
||||
remote: dummy-remote
|
||||
state: present
|
||||
method: "{{ method }}"
|
||||
no_dependencies: true
|
||||
register: double_addition_result
|
||||
|
||||
- name: Verify idempotency of addition with list test result - {{ method }}
|
||||
assert:
|
||||
that:
|
||||
- double_addition_result is not changed
|
||||
msg: "state=present shall not do anything when flatpak is already present"
|
||||
|
||||
- name: Test addition with list partially installed - {{ method }}
|
||||
flatpak:
|
||||
name:
|
||||
- com.dummy.App1
|
||||
- http://127.0.0.1:8000/repo/com.dummy.App2.flatpakref
|
||||
- com.dummy.App3
|
||||
remote: dummy-remote
|
||||
state: present
|
||||
method: "{{ method }}"
|
||||
no_dependencies: true
|
||||
register: addition_result
|
||||
|
||||
- name: Verify addition with list partially installed test result - {{ method }}
|
||||
assert:
|
||||
that:
|
||||
- addition_result is changed
|
||||
msg: "state=present shall add flatpak when absent"
|
||||
|
||||
- name: Test idempotency of addition with list partially installed - {{ method }}
|
||||
flatpak:
|
||||
name:
|
||||
- com.dummy.App1
|
||||
- http://127.0.0.1:8000/repo/com.dummy.App2.flatpakref
|
||||
- com.dummy.App3
|
||||
remote: dummy-remote
|
||||
state: present
|
||||
method: "{{ method }}"
|
||||
no_dependencies: true
|
||||
register: double_addition_result
|
||||
|
||||
- name: Verify idempotency of addition with list partially installed test result - {{ method }}
|
||||
assert:
|
||||
that:
|
||||
- double_addition_result is not changed
|
||||
msg: "state=present shall not do anything when flatpak is already present"
|
||||
|
||||
# state=absent with list of packages
|
||||
|
||||
- name: Test removal with list - {{ method }}
|
||||
flatpak:
|
||||
name:
|
||||
- com.dummy.App1
|
||||
- com.dummy.App2
|
||||
state: absent
|
||||
method: "{{ method }}"
|
||||
register: removal_result
|
||||
|
||||
- name: Verify removal with list test result - {{ method }}
|
||||
assert:
|
||||
that:
|
||||
- removal_result is changed
|
||||
msg: "state=absent shall remove flatpak when present"
|
||||
|
||||
- name: Test idempotency of removal with list - {{ method }}
|
||||
flatpak:
|
||||
name:
|
||||
- com.dummy.App1
|
||||
- com.dummy.App2
|
||||
state: absent
|
||||
method: "{{ method }}"
|
||||
register: double_removal_result
|
||||
|
||||
- name: Verify idempotency of removal with list test result - {{ method }}
|
||||
assert:
|
||||
that:
|
||||
- double_removal_result is not changed
|
||||
msg: "state=absent shall not do anything when flatpak is not present"
|
||||
|
||||
- name: Test removal with list partially removed - {{ method }}
|
||||
flatpak:
|
||||
name:
|
||||
- com.dummy.App1
|
||||
- com.dummy.App2
|
||||
- com.dummy.App3
|
||||
state: absent
|
||||
method: "{{ method }}"
|
||||
register: removal_result
|
||||
|
||||
- name: Verify removal with list partially removed test result - {{ method }}
|
||||
assert:
|
||||
that:
|
||||
- removal_result is changed
|
||||
msg: "state=absent shall remove flatpak when present"
|
||||
|
||||
- name: Test idempotency of removal with list partially removed - {{ method }}
|
||||
flatpak:
|
||||
name:
|
||||
- com.dummy.App1
|
||||
- com.dummy.App2
|
||||
- com.dummy.App3
|
||||
state: absent
|
||||
method: "{{ method }}"
|
||||
register: double_removal_result
|
||||
|
||||
- name: Verify idempotency of removal with list partially removed test result - {{ method }}
|
||||
assert:
|
||||
that:
|
||||
- double_removal_result is not changed
|
||||
msg: "state=absent shall not do anything when flatpak is not present"
|
||||
|
|
|
@ -18,7 +18,7 @@ flatpak install -y --system flathub org.freedesktop.Platform//1.6 org.freedeskto
|
|||
# Add individual flatpaks
|
||||
echo $'#!/bin/sh\necho hello world' > hello.sh
|
||||
|
||||
for NUM in 1 2; do
|
||||
for NUM in 1 2 3; do
|
||||
flatpak build-init appdir${NUM} com.dummy.App${NUM} org.freedesktop.Sdk org.freedesktop.Platform 1.6;
|
||||
flatpak build appdir${NUM} mkdir /app/bin;
|
||||
flatpak build appdir${NUM} install --mode=750 hello.sh /app/bin;
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue