Skip to content

Commit

Permalink
test: full test uses cockpit-composer or cockpit-machines
Browse files Browse the repository at this point in the history
Ensure the correct package is looked for in the extra/full packages test.
  • Loading branch information
richm committed Nov 20, 2024
1 parent b113215 commit 06503c9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/tests_packages_full.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
- name: "Test cockpit_packages: full"
hosts: all
gather_facts: true
tasks:
- name: Tests
block:
Expand Down Expand Up @@ -32,10 +33,14 @@
when: "'cockpit' not in ansible_facts.packages"

# extra package (part of full)
- name: Test - cockpit-machines package is installed
- name: Test - extra package is installed
fail:
msg: cockpit-machines is not installed
when: "'cockpit-machines' not in ansible_facts.packages"
msg: "{{ __extra_pkg }} is not installed"
when: __extra_pkg not in ansible_facts.packages
vars:
__extra_pkg: "{{ 'cockpit-composer'
if ansible_facts['os_family'] == 'RedHat'
else 'cockpit-machines' }}"

# another extra package (part of full)
- name: Test - cockpit-doc is installed
Expand Down

0 comments on commit 06503c9

Please sign in to comment.