mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #8861/76ebda7f backport][stable-7] snap tests: re-enable test for --dangerous using smaller snap (#8866)
snap tests: re-enable test for --dangerous using smaller snap (#8861)
(cherry picked from commit 76ebda7faf
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
2109d10740
commit
c4ea44ffb4
2 changed files with 35 additions and 31 deletions
|
@ -15,9 +15,8 @@
|
||||||
ansible.builtin.include_tasks: test.yml
|
ansible.builtin.include_tasks: test.yml
|
||||||
- name: Include test_channel
|
- name: Include test_channel
|
||||||
ansible.builtin.include_tasks: test_channel.yml
|
ansible.builtin.include_tasks: test_channel.yml
|
||||||
# TODO: Find better package to download and install from sources - cider 1.6.0 takes over 35 seconds to install
|
- name: Include test_dangerous
|
||||||
# - name: Include test_dangerous
|
ansible.builtin.include_tasks: test_dangerous.yml
|
||||||
# ansible.builtin.include_tasks: test_dangerous.yml
|
|
||||||
- name: Include test_3dash
|
- name: Include test_3dash
|
||||||
ansible.builtin.include_tasks: test_3dash.yml
|
ansible.builtin.include_tasks: test_3dash.yml
|
||||||
- name: Include test_empty_list
|
- name: Include test_empty_list
|
||||||
|
|
|
@ -5,43 +5,48 @@
|
||||||
|
|
||||||
# NOTE This is currently disabled for performance reasons!
|
# NOTE This is currently disabled for performance reasons!
|
||||||
|
|
||||||
- name: Make sure package is not installed (cider)
|
- name: Make sure package is not installed (bpytop)
|
||||||
community.general.snap:
|
community.general.snap:
|
||||||
name: cider
|
name: bpytop
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Download cider snap
|
- name: Download bpytop snap
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.command:
|
||||||
url: https://github.com/ciderapp/cider-releases/releases/download/v1.6.0/cider_1.6.0_amd64.snap
|
cmd: snap download bpytop
|
||||||
dest: "{{ remote_tmp_dir }}/cider_1.6.0_amd64.snap"
|
chdir: "{{ remote_tmp_dir }}"
|
||||||
mode: "0644"
|
register: bpytop_download
|
||||||
|
|
||||||
# Test for https://github.com/ansible-collections/community.general/issues/5715
|
- name: Test block
|
||||||
- name: Install package from file (check)
|
vars:
|
||||||
|
snap_file: "{{ (bpytop_download.stdout_lines[-1] | split(' '))[-1] }}"
|
||||||
|
snap_path: "{{ remote_tmp_dir }}/{{ snap_file }}"
|
||||||
|
block:
|
||||||
|
# Test for https://github.com/ansible-collections/community.general/issues/5715
|
||||||
|
- name: Install package from file (check)
|
||||||
community.general.snap:
|
community.general.snap:
|
||||||
name: "{{ remote_tmp_dir }}/cider_1.6.0_amd64.snap"
|
name: "{{ snap_path }}"
|
||||||
dangerous: true
|
dangerous: true
|
||||||
state: present
|
state: present
|
||||||
check_mode: true
|
check_mode: true
|
||||||
register: install_dangerous_check
|
register: install_dangerous_check
|
||||||
|
|
||||||
- name: Install package from file
|
- name: Install package from file
|
||||||
community.general.snap:
|
community.general.snap:
|
||||||
name: "{{ remote_tmp_dir }}/cider_1.6.0_amd64.snap"
|
name: "{{ snap_path }}"
|
||||||
dangerous: true
|
dangerous: true
|
||||||
state: present
|
state: present
|
||||||
register: install_dangerous
|
register: install_dangerous
|
||||||
|
|
||||||
- name: Install package from file
|
- name: Install package from file (again)
|
||||||
community.general.snap:
|
community.general.snap:
|
||||||
name: "{{ remote_tmp_dir }}/cider_1.6.0_amd64.snap"
|
name: "{{ snap_path }}"
|
||||||
dangerous: true
|
dangerous: true
|
||||||
state: present
|
state: present
|
||||||
register: install_dangerous_idempot
|
register: install_dangerous_idempot
|
||||||
|
|
||||||
- name: Remove package
|
- name: Remove package
|
||||||
community.general.snap:
|
community.general.snap:
|
||||||
name: cider
|
name: bpytop
|
||||||
state: absent
|
state: absent
|
||||||
register: remove_dangerous
|
register: remove_dangerous
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue