From 5fd79b13246f2983bc30bb7425198f70c9517146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20=C4=8Cuba?= Date: Thu, 23 Feb 2017 12:07:46 +0100 Subject: [PATCH] Add tests for reinstall command Reinstall should fail when source repository is disabled. --- .../features/reinstall-notavailable.feature | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 dnf-docker-test/features/reinstall-notavailable.feature diff --git a/dnf-docker-test/features/reinstall-notavailable.feature b/dnf-docker-test/features/reinstall-notavailable.feature new file mode 100644 index 0000000000..cc3f87a103 --- /dev/null +++ b/dnf-docker-test/features/reinstall-notavailable.feature @@ -0,0 +1,28 @@ +Feature: DNF/Behave test reinstall command + + @setup + Scenario: Feature Setup + Given repository "test" with packages + | Package | Tag | Value | + | TestA | Requires | TestA-libs | + | TestA-libs | | | + When I save rpmdb + And I enable repository "test" + And I successfully run "dnf install -y TestA" + Then rpmdb changes are + | State | Packages | + | installed | TestA, TestA-libs | + + Scenario: Reinstall package + When I save rpmdb + And I enable repository "test" + And I successfully run "dnf reinstall -y TestA-libs" + Then rpmdb changes are + | State | Packages | + | reinstalled | TestA-libs | + + Scenario: Reinstall - pkg not available + When I save rpmdb + And I disable repository "test" + And I run "dnf reinstall -y TestA-libs" + Then the command should fail