mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add dnf group install/upgrade integration tests (#27482)
This commit is contained in:
parent
350018de73
commit
43d3c092fa
1 changed files with 50 additions and 0 deletions
|
@ -240,3 +240,53 @@
|
|||
- name: uninstall sos in /
|
||||
dnf: name=sos installroot='/'
|
||||
register: dnf_result
|
||||
|
||||
# GROUP INSTALL
|
||||
- name: install RPM Development Tools group
|
||||
dnf:
|
||||
name: "@RPM Development Tools"
|
||||
state: present
|
||||
register: dnf_result
|
||||
|
||||
- debug: var=dnf_result
|
||||
|
||||
- name: verify installation of the group
|
||||
assert:
|
||||
that:
|
||||
- "not dnf_result.failed | default(False)"
|
||||
- "dnf_result.changed"
|
||||
|
||||
- name: verify dnf module outputs
|
||||
assert:
|
||||
that:
|
||||
- "'changed' in dnf_result"
|
||||
- "'results' in dnf_result"
|
||||
|
||||
# cleanup until https://github.com/ansible/ansible/issues/27377 is resolved
|
||||
- shell: dnf -y group install "RPM Development Tools" && dnf -y group remove "RPM Development Tools"
|
||||
|
||||
# GROUP UPGRADE - this will go to the same method as group install
|
||||
# but through group_update - it is its invocation we're testing here
|
||||
# see commit 119c9e5d6eb572c4a4800fbe8136095f9063c37b
|
||||
- name: install latest RPM Development Tools
|
||||
dnf:
|
||||
name: "@RPM Development Tools"
|
||||
state: latest
|
||||
register: dnf_result
|
||||
|
||||
- debug: var=dnf_result
|
||||
|
||||
- name: verify installation of the group
|
||||
assert:
|
||||
that:
|
||||
- "not dnf_result.failed | default(False)"
|
||||
- "dnf_result.changed"
|
||||
|
||||
- name: verify dnf module outputs
|
||||
assert:
|
||||
that:
|
||||
- "'changed' in dnf_result"
|
||||
- "'results' in dnf_result"
|
||||
|
||||
# cleanup until https://github.com/ansible/ansible/issues/27377 is resolved
|
||||
- shell: dnf -y group install "RPM Development Tools" && dnf -y group remove "RPM Development Tools"
|
||||
|
|
Loading…
Reference in a new issue