From 48efa832a009e46b9db97feac268b0d64808f28c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= Date: Wed, 11 Nov 2020 15:43:52 +0100 Subject: [PATCH] Add tests for multiple collections in one update for modular updateinfo https://bugzilla.redhat.com/show_bug.cgi?id=1804234 --- .../features/module/updateinfo.feature | 66 +++++++++++++++++-- .../updateinfo.xml | 11 +++- 2 files changed, 68 insertions(+), 9 deletions(-) diff --git a/dnf-behave-tests/features/module/updateinfo.feature b/dnf-behave-tests/features/module/updateinfo.feature index 3ccc6aac7..d5bbc64b9 100644 --- a/dnf-behave-tests/features/module/updateinfo.feature +++ b/dnf-behave-tests/features/module/updateinfo.feature @@ -1,13 +1,10 @@ Feature: Advisory aplicability on a modular system -Background: -Given I use repository "dnf-ci-fedora-modular" - And I use repository "dnf-ci-fedora" - - @bz1622614 Scenario: List available updates for installed streams (updates available) +Given I use repository "dnf-ci-fedora-modular" + And I use repository "dnf-ci-fedora" When I execute dnf with args "module enable postgresql:9.6" Then the exit code is 0 And modules state is following @@ -24,11 +21,17 @@ Scenario: List available updates for installed streams (updates available) Given I use repository "dnf-ci-fedora-modular-updates" When I execute dnf with args "updateinfo --list" Then the exit code is 0 - And stdout contains "FEDORA-2019-0329090518 enhancement postgresql-9.6.11-1.x86_64" + And stdout is + """ + + FEDORA-2019-0329090518 enhancement postgresql-9.6.11-1.x86_64 + """ @bz1622614 Scenario: Updates for non enabled streams are hidden +Given I use repository "dnf-ci-fedora-modular" + And I use repository "dnf-ci-fedora" When I execute dnf with args "module install postgresql:6/default" Then the exit code is 0 And Transaction contains @@ -40,4 +43,53 @@ Scenario: Updates for non enabled streams are hidden Given I use repository "dnf-ci-fedora-modular-updates" Then I execute dnf with args "updateinfo --list" Then the exit code is 0 - And stdout does not contain "FEDORA-2019-0329090518 enhancement postgresql-9.6.11-1.x86_64" + And stdout is + """ + + """ + + +@bz1804234 +Scenario: having installed packages from one collection and enabled all modules from another doesn't activate advisory +Given I use repository "dnf-ci-fedora" + And I execute dnf with args "install nodejs" + And I use repository "dnf-ci-fedora-modular-updates" + And I execute dnf with args "module enable postgresql:9.6" + When I execute dnf with args "updateinfo --list" + Then stdout is + """ + + """ + + +@bz1804234 +Scenario: having installed packages from all collections but enabled modules only for one shows just the one +Given I use repository "dnf-ci-fedora" + And I execute dnf with args "install nodejs" + And I use repository "dnf-ci-fedora-modular" + And I execute dnf with args "module enable postgresql:9.6" + And I execute dnf with args "module install postgresql/default" + And I use repository "dnf-ci-fedora-modular-updates" + When I execute dnf with args "updateinfo --list" + Then stdout is + """ + + FEDORA-2019-0329090518 enhancement postgresql-9.6.11-1.x86_64 + """ + + +Scenario: having two active collections shows packages from both +Given I use repository "dnf-ci-fedora" + And I execute dnf with args "install nodejs" + And I use repository "dnf-ci-fedora-modular" + And I execute dnf with args "module enable postgresql:9.6" + And I execute dnf with args "module install postgresql/default" + And I use repository "dnf-ci-fedora-modular-updates" + And I execute dnf with args "module enable nodejs:8" + When I execute dnf with args "updateinfo --list" + Then stdout is + """ + + FEDORA-2019-0329090518 enhancement nodejs-1:8.14.0-1.x86_64 + FEDORA-2019-0329090518 enhancement postgresql-9.6.11-1.x86_64 + """ diff --git a/dnf-behave-tests/fixtures/specs/dnf-ci-fedora-modular-updates/updateinfo.xml b/dnf-behave-tests/fixtures/specs/dnf-ci-fedora-modular-updates/updateinfo.xml index 1b42a59c1..26c702412 100644 --- a/dnf-behave-tests/fixtures/specs/dnf-ci-fedora-modular-updates/updateinfo.xml +++ b/dnf-behave-tests/fixtures/specs/dnf-ci-fedora-modular-updates/updateinfo.xml @@ -13,14 +13,21 @@ - - Foo component + + postgresql component postgresql-9.6.11-1.module_2689+ea8f147f.spec + + nodejs component + + + nodejs-8.14.0-1.x86_64.rpm + +