Skip to content

Commit

Permalink
Test "cockpit_packages: full" scenario
Browse files Browse the repository at this point in the history
This has bug reports such as [1], ensure that this generally works
everywhere.

[1] linux-system-roles#51
  • Loading branch information
martinpitt committed Feb 1, 2022
1 parent 22d1822 commit f245c54
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/tasks/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# everything else depends on one of these two, so will be removed along
- cockpit-bridge
- cockpit-ws
- cockpit-doc
state: absent
tags:
- always
Expand Down
41 changes: 41 additions & 0 deletions tests/tests_packages_full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
- name: "Test cockpit_packages: full"
hosts: all
tasks:
- name: tests
block:
- include_role:
name: linux-system-roles.cockpit
vars:
cockpit_packages: full

- meta: flush_handlers

- package_facts:

# basic package (part of minimal)
- name: test - cockpit-system is installed
fail:
msg: cockpit-system is not installed
when: "'cockpit-system' not in ansible_facts.packages"

# metapackage (part of default)
- name: test - cockpit metapackage is installed
fail:
msg: cockpit is not installed
when: "'cockpit' not in ansible_facts.packages"

# extra package (part of full)
- name: test - cockpit-pcp is installed
fail:
msg: cockpit-pcp is not installed
when: "'cockpit-pcp' not in ansible_facts.packages"

# another extra package (part of full)
- name: test - cockpit-doc is installed
fail:
msg: cockpit-doc is not installed
when: "'cockpit-doc' not in ansible_facts.packages"

always:
- include_tasks: tasks/cleanup.yml

0 comments on commit f245c54

Please sign in to comment.