From 0a7e8a60a80a4a681de8d5e6fb10e165b4bc6f32 Mon Sep 17 00:00:00 2001 From: Jan Kolarik Date: Wed, 18 Dec 2024 14:11:31 +0000 Subject: [PATCH] automatic: Tests for no updates functionality --- .../dnf/dnf-automatic/emit-no-updates.feature | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 dnf-behave-tests/dnf/dnf-automatic/emit-no-updates.feature diff --git a/dnf-behave-tests/dnf/dnf-automatic/emit-no-updates.feature b/dnf-behave-tests/dnf/dnf-automatic/emit-no-updates.feature new file mode 100644 index 000000000..9a8b270ea --- /dev/null +++ b/dnf-behave-tests/dnf/dnf-automatic/emit-no-updates.feature @@ -0,0 +1,21 @@ +@dnf5 +Feature: dnf-automatic does not emit when no updates are available + + +Scenario: dnf-automatic does not emit when no updates are available + When I execute dnf with args "automatic --installupdates" + Then the exit code is 0 + And Transaction is empty + And stdout is empty + + +Scenario: dnf-automatic emits message when no updates are available when emit_no_updates is on + Given I create file "/etc/dnf/automatic.conf" with + """ + [emitters] + emit_no_updates = yes + """ + When I execute dnf with args "automatic --installupdates" + Then the exit code is 0 + And Transaction is empty + And stdout contains "No new upgrades available."