From 5c033423b96a97318ad0ffd49385707300150cc7 Mon Sep 17 00:00:00 2001 From: Marek Blaha Date: Mon, 30 Oct 2023 11:30:01 +0100 Subject: [PATCH] Adjust dnf-automatic tests for dnf5 - as automatic is a plugin in dnf5, it correctly handles installroot so no need for @no_installroot tag - changed the way how automatic is called 'dnf-automatic' -> 'dnf5 automatic' --- .../dnf/dnf-automatic/reboot.feature | 21 +++++--------- .../dnf/dnf-automatic/update.feature | 29 +++++++------------ 2 files changed, 19 insertions(+), 31 deletions(-) diff --git a/dnf-behave-tests/dnf/dnf-automatic/reboot.feature b/dnf-behave-tests/dnf/dnf-automatic/reboot.feature index d72a33841..bc908b585 100644 --- a/dnf-behave-tests/dnf/dnf-automatic/reboot.feature +++ b/dnf-behave-tests/dnf/dnf-automatic/reboot.feature @@ -1,18 +1,13 @@ -@no_installroot +@dnf5 Feature: dnf-automatic reboots - Background: -Given I delete file "/etc/yum.repos.d/*.repo" with globs - And I create file "/etc/dnf/dnf.conf" with - """ - [main] - plugins=0 - """ +Given I enable plugin "automatic" And I use repository "simple-base" And I successfully execute dnf with args "install labirinto" And I use repository "simple-updates" + @bz2124793 Scenario: dnf-automatic does not reboot when reboot = never Given I create file "/etc/dnf/automatic.conf" with @@ -24,7 +19,7 @@ Scenario: dnf-automatic does not reboot when reboot = never [emitters] emit_via = stdio """ - When I execute dnf-automatic with args "--installupdates" + When I execute dnf with args "automatic --installupdates" Then the exit code is 0 And Transaction is following | Action | Package | @@ -45,7 +40,7 @@ Scenario: dnf-automatic reboots when packages changed and reboot = when-changed [emitters] emit_via = stdio """ - When I execute dnf-automatic with args "--installupdates" + When I execute dnf with args "automatic --installupdates" Then the exit code is 0 And Transaction is following | Action | Package | @@ -69,7 +64,7 @@ Scenario: dnf-automatic reboots when reboot = when-needed and important package And I use repository "dnf-ci-fedora" And I successfully execute dnf with args "install kernel" And I use repository "dnf-ci-fedora-updates" - When I execute dnf-automatic with args "--installupdates" + When I execute dnf with args "automatic --installupdates" Then the exit code is 0 And stdout contains lines: """ @@ -87,7 +82,7 @@ Scenario: dnf-automatic does not reboot when reboot = when-needed and nothing im [emitters] emit_via = stdio """ - When I execute dnf-automatic with args "--installupdates" + When I execute dnf with args "automatic --installupdates" Then the exit code is 0 And Transaction is following | Action | Package | @@ -108,7 +103,7 @@ Scenario: dnf-automatic shows error message when reboot command failed [emitters] emit_via = stdio """ - When I execute dnf-automatic with args "--installupdates" + When I execute dnf with args "automatic --installupdates" Then the exit code is 1 And Transaction is following | Action | Package | diff --git a/dnf-behave-tests/dnf/dnf-automatic/update.feature b/dnf-behave-tests/dnf/dnf-automatic/update.feature index 581dee895..60c62ef95 100644 --- a/dnf-behave-tests/dnf/dnf-automatic/update.feature +++ b/dnf-behave-tests/dnf/dnf-automatic/update.feature @@ -1,21 +1,16 @@ -@no_installroot +@dnf5 Feature: dnf-automatic performs update Background: -Given I delete file "/etc/yum.repos.d/*.repo" with globs - And I create file "/etc/dnf/dnf.conf" with - """ - [main] - plugins=0 - """ +Given I enable plugin "automatic" + And I use repository "simple-base" Scenario: dnf-automatic can update package - Given I use repository "simple-base" - And I successfully execute dnf with args "install labirinto" + Given I successfully execute dnf with args "install labirinto" And I use repository "simple-updates" - When I execute dnf-automatic with args "--installupdates" + When I execute dnf with args "automatic --installupdates" Then the exit code is 0 And Transaction is following | Action | Package | @@ -24,23 +19,21 @@ Scenario: dnf-automatic can update package @bz1793298 Scenario: dnf-automatic fails to update when the update package is not signed - Given I use repository "simple-base" - And I successfully execute dnf with args "install labirinto" + Given I successfully execute dnf with args "install labirinto" And I use repository "simple-updates" with configuration | key | value | | gpgcheck | 1 | - When I execute dnf-automatic with args "--installupdates" + When I execute dnf with args "automatic --installupdates" Then the exit code is 1 - And Transaction is empty + And RPMDB Transaction is empty @bz1793298 Scenario: dnf-automatic fails to update when the public gpg key is not installed - Given I use repository "simple-base" - And I successfully execute dnf with args "install dedalo-signed-1.0" + Given I successfully execute dnf with args "install dedalo-signed-1.0" And I use repository "simple-updates" with configuration | key | value | | gpgcheck | 1 | - When I execute dnf-automatic with args "--installupdates" + When I execute dnf with args "automatic --installupdates" Then the exit code is 1 - And Transaction is empty + And RPMDB Transaction is empty