ansible/test/integration/targets/dnf/tasks/modularity.yml
Sam Doran 18feeb51a8
Change integration tests in order to pass on Fedora 30 (#58081)
* Use different package for DNF tests
    Ninja caused errors in Fedora 30. This works in both Fedora 29 and 30.

* Fix git integration tests
    Git >= 2.21.0 has either a bug or change in behavior where it errors when fetching a
    repository containing submodules that are behind the upstream submodule commits.
    It's weird and I don't fully understand it.

    Get around this my checking out specific commits from a repository rather than
    switch the origin URL.

* Fix PostgreSQL tests
    The error message is slightly different
2019-06-19 12:38:05 -04:00

58 lines
1.4 KiB
YAML

# FUTURE - look at including AppStream support in our local repo
- name: set package for RHEL
set_fact:
astream_name: '@swig:3.0/default'
when: ansible_distribution == 'RedHat'
- name: set package for Fedora
set_fact:
astream_name: '@ripgrep:master/default'
when: ansible_distribution == 'Fedora'
- 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"