summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2024-07-09 22:26:29 +0200
committerGitHub <noreply@github.com>2024-07-09 22:26:29 +0200
commit28cef00576c243b87b59961bffb110f9df855c23 (patch)
treec381aadfd1506afc8356277ffa69e0f8c40871f1 /test
parentfix misc. documentation typos and formatting for modules starting with u-y (#... (diff)
downloadansible-28cef00576c243b87b59961bffb110f9df855c23.tar.xz
ansible-28cef00576c243b87b59961bffb110f9df855c23.zip
dnf: follow-up on is_newer_installed arches fix (#83556)
* dnf: follow-up on is_newer_installed arches fix * fix for the non package object case * prevent early bailout in dnf _is_newer_version_installed * non-installed available arches would fail out of the check early --------- Co-authored-by: Matt Davis <nitzmahone@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/integration/targets/dnf/tasks/repo.yml37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/integration/targets/dnf/tasks/repo.yml b/test/integration/targets/dnf/tasks/repo.yml
index 634b46f48c..31ad963334 100644
--- a/test/integration/targets/dnf/tasks/repo.yml
+++ b/test/integration/targets/dnf/tasks/repo.yml
@@ -562,3 +562,40 @@
dnf:
name: dinginessentail
state: absent
+
+- block:
+ - name: make sure dinginessentail is not installed
+ dnf:
+ name: dinginessentail
+ state: absent
+
+ - name: install dinginessentail both archs
+ dnf:
+ name:
+ - "{{ repodir }}/dinginessentail-1.1-1.x86_64.rpm"
+ - "{{ repodir_i686 }}/dinginessentail-1.1-1.i686.rpm"
+ state: present
+ disable_gpg_check: true
+
+ - name: try to install lower version of dinginessentail from rpm file, without allow_downgrade, just one arch
+ dnf:
+ name: "{{ repodir_i686 }}/dinginessentail-1.0-1.i686.rpm"
+ state: present
+ register: dnf_result
+
+ - name: check dinginessentail with rpm
+ shell: rpm -q dinginessentail
+ register: rpm_result
+
+ - name: verify installation
+ assert:
+ that:
+ - "not dnf_result.changed"
+ - "rpm_result.stdout_lines[0].startswith('dinginessentail-1.1-1')"
+ - "rpm_result.stdout_lines[1].startswith('dinginessentail-1.1-1')"
+ always:
+ - name: Clean up
+ dnf:
+ name: dinginessentail
+ state: absent
+ when: ansible_architecture == "x86_64"