ansible/test/integration/targets/dnf/tasks/modularity.yml
Adam Miller ed86907587 DNF Handle Empty AppStream stream definition (#63819)
* DNF Handle Empty AppStream stream definition

Fixes #63683

Signed-off-by: Adam Miller <admiller@redhat.com>

* Switch Fedora dnf test target modularity to stratis

In Fedora 29, the metadata was not properly set for a default stream
for ripgrep even though there is a profile called "default", however
that's an arbitrary string and the module maintainer must set the
default stream (which it never was for the ripgrep module, thus
failing the "empty stream" install test)

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-10-24 00:57:31 -04:00

99 lines
2.7 KiB
YAML

# FUTURE - look at including AppStream support in our local repo
- name: Include distribution specific variables
include_vars: "{{ ansible_facts.distribution }}.yml"
- name: install "{{ astream_name }}" module
dnf:
name: "{{ astream_name }}"
state: present
register: dnf_result
- name: verify installation of "{{ astream_name }}" module
assert:
that:
- "not dnf_result.failed"
- "dnf_result.changed"
- name: install "{{ astream_name }}" module again
dnf:
name: "{{ astream_name }}"
state: present
register: dnf_result
- name: verify installation of "{{ astream_name }}" module again
assert:
that:
- "not dnf_result.failed"
- "not dnf_result.changed"
- name: uninstall "{{ astream_name }}" module
dnf:
name: "{{ astream_name }}"
state: absent
register: dnf_result
- name: verify uninstallation of "{{ astream_name }}" module
assert:
that:
- "not dnf_result.failed"
- "dnf_result.changed"
- name: uninstall "{{ astream_name }}" module again
dnf:
name: "{{ astream_name }}"
state: absent
register: dnf_result
- name: verify uninstallation of "{{ astream_name }}" module again
assert:
that:
- "not dnf_result.failed"
- "not dnf_result.changed"
- name: install "{{ astream_name_no_stream }}" module without providing stream
dnf:
name: "{{ astream_name_no_stream }}"
state: present
register: dnf_result
- name: verify installation of "{{ astream_name_no_stream }}" module without providing stream
assert:
that:
- "not dnf_result.failed"
- "dnf_result.changed"
- name: install "{{ astream_name_no_stream }}" module again without providing stream
dnf:
name: "{{ astream_name_no_stream }}"
state: present
register: dnf_result
- name: verify installation of "{{ astream_name_no_stream }}" module again without providing stream
assert:
that:
- "not dnf_result.failed"
- "not dnf_result.changed"
- name: uninstall "{{ astream_name_no_stream }}" module without providing stream
dnf:
name: "{{ astream_name_no_stream }}"
state: absent
register: dnf_result
- name: verify uninstallation of "{{ astream_name_no_stream }}" module without providing stream
assert:
that:
- "not dnf_result.failed"
- "dnf_result.changed"
- name: uninstall "{{ astream_name_no_stream }}" module again without providing stream
dnf:
name: "{{ astream_name_no_stream }}"
state: absent
register: dnf_result
- name: verify uninstallation of "{{ astream_name_no_stream }}" module again without providing stream
assert:
that:
- "not dnf_result.failed"
- "not dnf_result.changed"