summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/dnf
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2024-05-09 10:54:40 +0200
committerGitHub <noreply@github.com>2024-05-09 10:54:40 +0200
commit3c280e6c1ba56934c5492a689766729117af926d (patch)
tree6018450ec234d3507a645ad2703ed6c2af78986f /test/integration/targets/dnf
parentDarwin: add unit tests for hardware fact gathering (#83212) (diff)
downloadansible-3c280e6c1ba56934c5492a689766729117af926d.tar.xz
ansible-3c280e6c1ba56934c5492a689766729117af926d.zip
dnf5: implement enable_plugin and disable_plugin options (#83105)
https://github.com/rpm-software-management/dnf5/commit/80cfea9c2514704058ce501c496433fbb6e349bf
Diffstat (limited to 'test/integration/targets/dnf')
-rw-r--r--test/integration/targets/dnf/tasks/dnf.yml24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/integration/targets/dnf/tasks/dnf.yml b/test/integration/targets/dnf/tasks/dnf.yml
index 6b1a27fc8e..2d7772492f 100644
--- a/test/integration/targets/dnf/tasks/dnf.yml
+++ b/test/integration/targets/dnf/tasks/dnf.yml
@@ -873,3 +873,27 @@
- dnf:
name: langpacks-ja
state: absent
+
+- name: test passing non existing plugins, should fail
+ block:
+ - dnf:
+ name: sos
+ enable_plugin: nonexisting
+ ignore_errors: true
+ register: enable_plugin_result
+
+ - dnf:
+ name: sos
+ disable_plugin: nonexisting
+ ignore_errors: true
+ register: disable_plugin_result
+
+ - assert:
+ that:
+ - enable_plugin_result is failed
+ - disable_plugin_result is failed
+ - '"No matches were found for the following plugin name patterns while enabling libdnf5 plugins: " in enable_plugin_result.msg'
+ - '"No matches were found for the following plugin name patterns while disabling libdnf5 plugins: " in disable_plugin_result.msg'
+ - '"nonexisting" in enable_plugin_result.msg'
+ - '"nonexisting" in disable_plugin_result.msg'
+ when: dnf5|default(false)