1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/tests/integration/targets/snap/tasks/test_dangerous.yml
patchback[bot] 838ff55003
[PR #8148/609f28f7 backport][stable-7] snap: disable some tests that take way too long (#8149)
snap: disable some tests that take way too long (#8148)

* Do not install microk8s in snap tests, as it is too slow.

* Do not install cider in snap tests, as it is slow.

(cherry picked from commit 609f28f791)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-03-25 06:49:39 +01:00

53 lines
1.5 KiB
YAML

---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# NOTE This is currently disabled for performance reasons!
- name: Make sure package is not installed (cider)
community.general.snap:
name: cider
state: absent
- name: Download cider snap
ansible.builtin.get_url:
url: https://github.com/ciderapp/cider-releases/releases/download/v1.6.0/cider_1.6.0_amd64.snap
dest: "{{ remote_tmp_dir }}/cider_1.6.0_amd64.snap"
mode: "0644"
# Test for https://github.com/ansible-collections/community.general/issues/5715
- name: Install package from file (check)
community.general.snap:
name: "{{ remote_tmp_dir }}/cider_1.6.0_amd64.snap"
dangerous: true
state: present
check_mode: true
register: install_dangerous_check
- name: Install package from file
community.general.snap:
name: "{{ remote_tmp_dir }}/cider_1.6.0_amd64.snap"
dangerous: true
state: present
register: install_dangerous
- name: Install package from file
community.general.snap:
name: "{{ remote_tmp_dir }}/cider_1.6.0_amd64.snap"
dangerous: true
state: present
register: install_dangerous_idempot
- name: Remove package
community.general.snap:
name: cider
state: absent
register: remove_dangerous
- assert:
that:
- install_dangerous_check is changed
- install_dangerous is changed
- install_dangerous_idempot is not changed
- remove_dangerous is changed