summaryrefslogtreecommitdiff
path: root/test/integration/targets/flatpak
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/flatpak')
-rw-r--r--test/integration/targets/flatpak/aliases8
-rw-r--r--test/integration/targets/flatpak/meta/main.yml2
-rw-r--r--test/integration/targets/flatpak/tasks/check_mode.yml193
-rw-r--r--test/integration/targets/flatpak/tasks/main.yml56
-rw-r--r--test/integration/targets/flatpak/tasks/setup.yml41
-rw-r--r--test/integration/targets/flatpak/tasks/test.yml115
6 files changed, 0 insertions, 415 deletions
diff --git a/test/integration/targets/flatpak/aliases b/test/integration/targets/flatpak/aliases
deleted file mode 100644
index ce0a136c17..0000000000
--- a/test/integration/targets/flatpak/aliases
+++ /dev/null
@@ -1,8 +0,0 @@
-unsupported
-destructive
-skip/aix
-skip/freebsd
-skip/osx
-skip/rhel
-needs/root
-needs/privileged
diff --git a/test/integration/targets/flatpak/meta/main.yml b/test/integration/targets/flatpak/meta/main.yml
deleted file mode 100644
index 07faa21776..0000000000
--- a/test/integration/targets/flatpak/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_tests
diff --git a/test/integration/targets/flatpak/tasks/check_mode.yml b/test/integration/targets/flatpak/tasks/check_mode.yml
deleted file mode 100644
index 065f10dfa7..0000000000
--- a/test/integration/targets/flatpak/tasks/check_mode.yml
+++ /dev/null
@@ -1,193 +0,0 @@
-# - Tests with absent flatpak --------------------------------------------------
-
-# state=present on absent flatpak
-
-- name: Test addition of absent flatpak (check mode)
- flatpak:
- name: org.gnome.Characters
- remote: flathub
- state: present
- register: addition_result
- check_mode: true
-
-- name: Verify addition of absent flatpak test result (check mode)
- assert:
- that:
- - "addition_result.changed == true"
- msg: "Adding an absent flatpak shall mark module execution as changed"
-
-- name: Test non-existent idempotency of addition of absent flatpak (check mode)
- flatpak:
- name: org.gnome.Characters
- remote: flathub
- state: present
- register: double_addition_result
- check_mode: true
-
-- name: Verify non-existent idempotency of addition of absent flatpak test result (check mode)
- assert:
- that:
- - "double_addition_result.changed == true"
- msg: |
- Adding an absent flatpak a second time shall still mark module execution
- as changed in check mode
-
-# state=absent on absent flatpak
-
-- name: Test removal of absent flatpak check mode
- flatpak:
- name: org.gnome.Characters
- state: absent
- register: removal_result
- check_mode: true
-
-- name: Verify removal of absent flatpak test result (check mode)
- assert:
- that:
- - "removal_result.changed == false"
- msg: "Removing an absent flatpak shall mark module execution as not changed"
-
-# state=present with url on absent flatpak
-
-- name: Test addition of absent flatpak with url (check mode)
- flatpak:
- name: https://flathub.org/repo/appstream/org.gnome.Characters.flatpakref
- remote: flathub
- state: present
- register: url_addition_result
- check_mode: true
-
-- name: Verify addition of absent flatpak with url test result (check mode)
- assert:
- that:
- - "url_addition_result.changed == true"
- 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)
- flatpak:
- name: https://flathub.org/repo/appstream/org.gnome.Characters.flatpakref
- remote: flathub
- state: present
- register: double_url_addition_result
- check_mode: true
-
-- name: >
- Verify non-existent idempotency of additionof absent flatpak with url test
- result (check mode)
- assert:
- that:
- - "double_url_addition_result.changed == true"
- msg: |
- Adding an absent flatpak from URL a second time shall still mark module execution
- as changed in check mode
-
-# state=absent with url on absent flatpak
-
-- name: Test removal of absent flatpak with url not doing anything (check mode)
- flatpak:
- name: https://flathub.org/repo/appstream/org.gnome.Characters.flatpakref
- state: absent
- register: url_removal_result
- check_mode: true
-
-- name: Verify removal of absent flatpak with url test result (check mode)
- assert:
- that:
- - "url_removal_result.changed == false"
- msg: "Removing an absent flatpak shall mark module execution as not changed"
-
-
-# - Tests with present flatpak -------------------------------------------------
-
-# state=present on present flatpak
-
-- name: Test addition of present flatpak (check mode)
- flatpak:
- name: org.gnome.Calculator
- remote: flathub
- state: present
- register: addition_present_result
- check_mode: true
-
-- name: Verify addition test result of present flatpak (check mode)
- assert:
- that:
- - "addition_present_result.changed == false"
- msg: "Adding an present flatpak shall mark module execution as not changed"
-
-# state=absent on present flatpak
-
-- name: Test removal of present flatpak (check mode)
- flatpak:
- name: org.gnome.Calculator
- state: absent
- register: removal_present_result
- check_mode: true
-
-- name: Verify removal of present flatpak test result (check mode)
- assert:
- that:
- - "removal_present_result.changed == true"
- msg: "Removing a present flatpak shall mark module execution as changed"
-
-- name: Test non-existent idempotency of removal (check mode)
- flatpak:
- name: org.gnome.Calculator
- state: absent
- register: double_removal_present_result
- check_mode: true
-
-- name: Verify non-existent idempotency of removal (check mode)
- assert:
- that:
- - "double_removal_present_result.changed == true"
- msg: |
- Removing a present flatpak a second time shall still mark module execution
- as changed in check mode
-
-# state=present with url on present flatpak
-
-- name: Test addition with url of present flatpak (check mode)
- flatpak:
- name: https://flathub.org/repo/appstream/org.gnome.Calculator.flatpakref
- remote: flathub
- state: present
- register: url_addition_present_result
- check_mode: true
-
-- name: Verify addition with url of present flatpak test result (check mode)
- assert:
- that:
- - "url_addition_present_result.changed == false"
- msg: "Adding a present flatpak from URL shall mark module execution as not changed"
-
-# state=absent with url on present flatpak
-
-- name: Test removal with url of present flatpak (check mode)
- flatpak:
- name: https://flathub.org/repo/appstream/org.gnome.Calculator.flatpakref
- state: absent
- register: url_removal_present_result
- check_mode: true
-
-- name: Verify removal with url of present flatpak test result (check mode)
- assert:
- that:
- - "url_removal_present_result.changed == true"
- 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)
- flatpak:
- name: https://flathub.org/repo/appstream/org.gnome.Calculator.flatpakref
- remote: flathub
- state: absent
- register: double_url_removal_present_result
- check_mode: true
-
-- name: >
- Verify non-existent idempotency of installation with url of present
- flatpak test result (check mode)
- assert:
- that:
- - "double_url_removal_present_result.changed == true"
- msg: Removing an absent flatpak a second time shall still mark module execution as changed
diff --git a/test/integration/targets/flatpak/tasks/main.yml b/test/integration/targets/flatpak/tasks/main.yml
deleted file mode 100644
index daa7d8cd17..0000000000
--- a/test/integration/targets/flatpak/tasks/main.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-# (c) 2018, Alexander Bethke <oolongbrothers@gmx.net>
-# (c) 2018, Ansible Project
-
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
-- block:
-
- - import_tasks: setup.yml
- become: true
-
- # executable override
-
- - name: Test executable override
- flatpak:
- name: org.gnome.Characters
- remote: flathub
- state: present
- executable: nothing-that-exists
- ignore_errors: true
- register: executable_override_result
-
- - name: Verify executable override test result
- assert:
- that:
- - "executable_override_result.failed == true"
- - "executable_override_result.changed == false"
- msg: "Specifying non-existing executable shall fail module execution"
-
- - import_tasks: check_mode.yml
- become: false
-
- - import_tasks: test.yml
- become: false
- vars:
- method: user
-
- - import_tasks: test.yml
- become: true
- vars:
- method: system
-
- when: |
- ansible_distribution in ('Fedora', 'Ubuntu')
diff --git a/test/integration/targets/flatpak/tasks/setup.yml b/test/integration/targets/flatpak/tasks/setup.yml
deleted file mode 100644
index 954d56a0ce..0000000000
--- a/test/integration/targets/flatpak/tasks/setup.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-- name: Install flatpak on Fedora
- dnf:
- name: flatpak
- state: present
- become: true
- when: ansible_distribution == 'Fedora'
-
-- block:
- - name: Activate flatpak ppa on Ubuntu
- apt_repository:
- repo: "ppa:alexlarsson/flatpak"
- state: present
- mode: 0644
-
- - name: Install flatpak package on Ubuntu
- apt:
- name: flatpak
- state: present
-
- become: true
- when: ansible_distribution == 'Ubuntu'
-
-- name: Enable flathub for user
- flatpak_remote:
- name: flathub
- state: present
- flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
- method: user
-
-- name: Enable flathub for system
- flatpak_remote:
- name: flathub
- state: present
- flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
- method: system
-
-- name: Add flatpak for testing check mode on present flatpak
- flatpak:
- name: org.gnome.Calculator
- remote: flathub
- state: present
diff --git a/test/integration/targets/flatpak/tasks/test.yml b/test/integration/targets/flatpak/tasks/test.yml
deleted file mode 100644
index 5677dda289..0000000000
--- a/test/integration/targets/flatpak/tasks/test.yml
+++ /dev/null
@@ -1,115 +0,0 @@
-# state=present
-
-- name: Test addition - {{ method }}
- flatpak:
- name: org.gnome.Characters
- remote: flathub
- state: present
- method: "{{ method }}"
- register: addition_result
-
-- name: Verify addition test result - {{ method }}
- assert:
- that:
- - "addition_result.changed == true"
- msg: "state=preset shall add flatpak when absent"
-
-- name: Test idempotency of addition - {{ method }}
- flatpak:
- name: org.gnome.Characters
- remote: flathub
- state: present
- method: "{{ method }}"
- register: double_addition_result
-
-- name: Verify idempotency of addition test result - {{ method }}
- assert:
- that:
- - "double_addition_result.changed == false"
- msg: "state=present shall not do anything when flatpak is already present"
-
-# state=absent
-
-- name: Test removal - {{ method }}
- flatpak:
- name: org.gnome.Characters
- state: absent
- method: "{{ method }}"
- register: removal_result
-
-- name: Verify removal test result - {{ method }}
- assert:
- that:
- - "removal_result.changed == true"
- msg: "state=absent shall remove flatpak when present"
-
-- name: Test idempotency of removal - {{ method }}
- flatpak:
- name: org.gnome.Characters
- state: absent
- method: "{{ method }}"
- register: double_removal_result
-
-- name: Verify idempotency of removal test result - {{ method }}
- assert:
- that:
- - "double_removal_result.changed == false"
- msg: "state=absent shall not do anything when flatpak is not present"
-
-# state=present with url as name
-
-- name: Test addition with url - {{ method }}
- flatpak:
- name: https://flathub.org/repo/appstream/org.gnome.Characters.flatpakref
- remote: flathub
- state: present
- method: "{{ method }}"
- register: url_addition_result
-
-- name: Verify addition test result - {{ method }}
- assert:
- that:
- - "url_addition_result.changed == true"
- msg: "state=preset with url as name shall add flatpak when absent"
-
-- name: Test idempotency of addition with url - {{ method }}
- flatpak:
- name: https://flathub.org/repo/appstream/org.gnome.Characters.flatpakref
- remote: flathub
- state: present
- method: "{{ method }}"
- register: double_url_addition_result
-
-- name: Verify idempotency of addition with url test result - {{ method }}
- assert:
- that:
- - "double_url_addition_result.changed == false"
- msg: "state=present with url as name shall not do anything when flatpak is already present"
-
-# state=absent with url as name
-
-- name: Test removal with url - {{ method }}
- flatpak:
- name: https://flathub.org/repo/appstream/org.gnome.Characters.flatpakref
- state: absent
- method: "{{ method }}"
- register: url_removal_result
-
-- name: Verify removal test result - {{ method }}
- assert:
- that:
- - "url_removal_result.changed == true"
- msg: "state=absent with url as name shall remove flatpak when present"
-
-- name: Test idempotency of removal with url - {{ method }}
- flatpak:
- name: https://flathub.org/repo/appstream/org.gnome.Characters.flatpakref
- state: absent
- method: "{{ method }}"
- register: double_url_removal_result
-
-- name: Verify idempotency of removal with url test result - {{ method }}
- assert:
- that:
- - "double_url_removal_result.changed == false"
- msg: "state=absent with url as name shall not do anything when flatpak is not present"