From 488534b90628b64a9ad20a24269f08e4b8c9d685 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Thu, 5 Oct 2017 14:57:15 +0200 Subject: [PATCH] yum: add integration test for incompatible arch rpm (#31185) --- test/integration/targets/yum/tasks/yum.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/integration/targets/yum/tasks/yum.yml b/test/integration/targets/yum/tasks/yum.yml index e486eeb63ca..2b99dcfbfcc 100644 --- a/test/integration/targets/yum/tasks/yum.yml +++ b/test/integration/targets/yum/tasks/yum.yml @@ -456,3 +456,17 @@ that: - "not yum_result.changed" - "'Packages providing httpd not installed due to update_only specified' in yum_result.results" + +- name: try to install not compatible arch rpm, should fail + yum: + name: http://download.fedoraproject.org/pub/epel/7/ppc64le/b/banner-1.3.4-3.el7.ppc64le.rpm + state: present + register: yum_result + ignore_errors: True + +- name: verify that yum failed + assert: + that: + - "yum_result.rc == 1" + - "not yum_result.changed" + - "yum_result|failed"