From 37cddb8c020f9eb202fea1dcdd5eabfb58692c06 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 9 Apr 2023 04:20:28 +1200 Subject: [PATCH] snap: enable ubuntu in integration tests (#6299) enable ubuntu in integration tests for snap --- .../targets/setup_snap/tasks/D-Ubuntu.yml | 19 +++++++++++++++++++ .../targets/setup_snap/tasks/default.yml | 2 +- tests/integration/targets/snap/aliases | 1 - tests/integration/targets/snap/tasks/main.yml | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 tests/integration/targets/setup_snap/tasks/D-Ubuntu.yml diff --git a/tests/integration/targets/setup_snap/tasks/D-Ubuntu.yml b/tests/integration/targets/setup_snap/tasks/D-Ubuntu.yml new file mode 100644 index 0000000000..93958d38dd --- /dev/null +++ b/tests/integration/targets/setup_snap/tasks/D-Ubuntu.yml @@ -0,0 +1,19 @@ +--- +# 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 + +- name: Install snapd (ubuntu) + package: + name: "{{ snap_packages }}" + state: present + notify: Remove snapd + +- name: Make sure that snapd is running + service: + name: snapd + state: started + +- name: Inform that snap is installed + set_fact: + has_snap: true diff --git a/tests/integration/targets/setup_snap/tasks/default.yml b/tests/integration/targets/setup_snap/tasks/default.yml index 391ae86f8d..d0681fa388 100644 --- a/tests/integration/targets/setup_snap/tasks/default.yml +++ b/tests/integration/targets/setup_snap/tasks/default.yml @@ -3,7 +3,7 @@ # 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 -- name: Install snapd +- name: Install snapd (default) package: name: "{{ snap_packages }}" state: present diff --git a/tests/integration/targets/snap/aliases b/tests/integration/targets/snap/aliases index a50e25cc5c..b209bbc015 100644 --- a/tests/integration/targets/snap/aliases +++ b/tests/integration/targets/snap/aliases @@ -11,4 +11,3 @@ skip/freebsd skip/osx skip/macos skip/docker -skip/ubuntu # FIXME! diff --git a/tests/integration/targets/snap/tasks/main.yml b/tests/integration/targets/snap/tasks/main.yml index 906d741127..21b0c8124a 100644 --- a/tests/integration/targets/snap/tasks/main.yml +++ b/tests/integration/targets/snap/tasks/main.yml @@ -53,7 +53,7 @@ - name: Check package has been installed correctly (hello-world) command: hello-world environment: - PATH: /var/lib/snapd/snap/bin/ + PATH: /snap/bin/ - name: Remove package (hello-world) (check mode) community.general.snap: