summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/flatpak_remote/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/flatpak_remote/tasks')
-rw-r--r--test/integration/targets/flatpak_remote/tasks/check_mode.yml101
-rw-r--r--test/integration/targets/flatpak_remote/tasks/main.yml57
-rw-r--r--test/integration/targets/flatpak_remote/tasks/setup.yml27
-rw-r--r--test/integration/targets/flatpak_remote/tasks/test.yml72
4 files changed, 0 insertions, 257 deletions
diff --git a/test/integration/targets/flatpak_remote/tasks/check_mode.yml b/test/integration/targets/flatpak_remote/tasks/check_mode.yml
deleted file mode 100644
index 7ce89a8c15..0000000000
--- a/test/integration/targets/flatpak_remote/tasks/check_mode.yml
+++ /dev/null
@@ -1,101 +0,0 @@
-# - Tests with absent flatpak remote -------------------------------------------
-
-# state=present
-
-- name: Test addition of absent flatpak remote (check mode)
- flatpak_remote:
- name: flatpak-test
- flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
- 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
- flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
- 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
- flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
- 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
diff --git a/test/integration/targets/flatpak_remote/tasks/main.yml b/test/integration/targets/flatpak_remote/tasks/main.yml
deleted file mode 100644
index 9c3ec6d798..0000000000
--- a/test/integration/targets/flatpak_remote/tasks/main.yml
+++ /dev/null
@@ -1,57 +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_remote:
- name: irrelevant
- remote: irrelevant
- 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 == 'Fedora' or
- ansible_distribution == 'Ubuntu' and not ansible_distribution_major_version | int < 16
diff --git a/test/integration/targets/flatpak_remote/tasks/setup.yml b/test/integration/targets/flatpak_remote/tasks/setup.yml
deleted file mode 100644
index b2fd276604..0000000000
--- a/test/integration/targets/flatpak_remote/tasks/setup.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-- name: Install flatpak on Fedora
- dnf:
- name: flatpak
- state: present
-
- when: ansible_distribution == 'Fedora'
-
-- block:
- - 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:
- name: flatpak
- state: present
-
- when: ansible_distribution == 'Ubuntu'
-
-- name: Install flatpak remote for testing check mode
- flatpak_remote:
- name: check-mode-test-remote
- flatpakrepo_url: /tmp/flatpak/repo/dummy-repo.flatpakrepo
- state: present
diff --git a/test/integration/targets/flatpak_remote/tasks/test.yml b/test/integration/targets/flatpak_remote/tasks/test.yml
deleted file mode 100644
index 97a13f0cbd..0000000000
--- a/test/integration/targets/flatpak_remote/tasks/test.yml
+++ /dev/null
@@ -1,72 +0,0 @@
-# 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:
- - "addition_result.changed == true"
- msg: "state=preset shall add flatpak when absent"
-
-- 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:
- - "double_addition_result.changed == false"
- 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:
- - "url_update_result.changed == false"
- 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:
- - "removal_result.changed == true"
- 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:
- - "double_removal_result.changed == false"
- msg: "state=absent shall not do anything when flatpak is not present"