mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Use local dummy repo for flatpak_remote integration tests (#52668)
* Use local dummy repo for flatpak_remote integration tests * Excludes versions of Ubuntu older than 16.04 from tests Since there are no flatpak packages available for these Ubuntu versions * Adds handler that removes temporary symlink
This commit is contained in:
committed by
Matt Clay
parent
a4cdf0d698
commit
8f354ea307
@@ -1,7 +1,6 @@
|
||||
unsupported
|
||||
shippable/posix/group3
|
||||
destructive
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/rhel
|
||||
needs/root
|
||||
needs/privileged
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
dependencies:
|
||||
- prepare_tests
|
||||
- setup_flatpak_remote
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
- name: Test addition of absent flatpak remote (check mode)
|
||||
flatpak_remote:
|
||||
name: flatpak-test
|
||||
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
|
||||
state: present
|
||||
register: addition_result
|
||||
check_mode: true
|
||||
@@ -19,7 +19,7 @@
|
||||
- name: Test non-existent idempotency of addition of absent flatpak remote (check mode)
|
||||
flatpak_remote:
|
||||
name: flatpak-test
|
||||
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
|
||||
state: present
|
||||
register: double_addition_result
|
||||
check_mode: true
|
||||
@@ -57,7 +57,7 @@
|
||||
- name: Test addition of present flatpak remote (check mode)
|
||||
flatpak_remote:
|
||||
name: check-mode-test-remote
|
||||
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
|
||||
state: present
|
||||
register: addition_result
|
||||
check_mode: true
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
# executable override
|
||||
|
||||
- name: Test executable override
|
||||
flatpak:
|
||||
name: org.gnome.Characters
|
||||
remote: flathub
|
||||
flatpak_remote:
|
||||
name: irrelevant
|
||||
remote: irrelevant
|
||||
state: present
|
||||
executable: nothing-that-exists
|
||||
ignore_errors: true
|
||||
@@ -53,4 +53,5 @@
|
||||
method: system
|
||||
|
||||
when: |
|
||||
ansible_distribution in ('Fedora', 'Ubuntu')
|
||||
ansible_distribution == 'Fedora' or
|
||||
ansible_distribution == 'Ubuntu' and not ansible_distribution_major_version | int < 16
|
||||
|
||||
@@ -6,11 +6,12 @@
|
||||
when: ansible_distribution == 'Fedora'
|
||||
|
||||
- block:
|
||||
- name: Activate flatpak ppa on Ubuntu
|
||||
- name: Activate flatpak ppa on Ubuntu versions older than 18.04/bionic
|
||||
apt_repository:
|
||||
repo: "ppa:alexlarsson/flatpak"
|
||||
state: present
|
||||
mode: 0644
|
||||
when: ansible_lsb.major_release | int < 18
|
||||
|
||||
- name: Install flatpak package on Ubuntu
|
||||
apt:
|
||||
@@ -19,8 +20,8 @@
|
||||
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: Install flatpak_remote for testing check mode
|
||||
- name: Install flatpak remote for testing check mode
|
||||
flatpak_remote:
|
||||
name: check-mode-test-remote
|
||||
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
|
||||
state: present
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
- name: Test addition - {{ method }}
|
||||
flatpak_remote:
|
||||
name: flatpak-test
|
||||
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
|
||||
state: present
|
||||
method: "{{ method }}"
|
||||
register: addition_result
|
||||
@@ -17,7 +17,7 @@
|
||||
- name: Test idempotency of addition - {{ method }}
|
||||
flatpak_remote:
|
||||
name: flatpak-test
|
||||
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
|
||||
state: present
|
||||
method: "{{ method }}"
|
||||
register: double_addition_result
|
||||
|
||||
Reference in New Issue
Block a user