diff --git a/dnf-behave-tests/dnf/comps-upgrade.feature b/dnf-behave-tests/dnf/comps-upgrade.feature
index fccccd444..a731b987e 100644
--- a/dnf-behave-tests/dnf/comps-upgrade.feature
+++ b/dnf-behave-tests/dnf/comps-upgrade.feature
@@ -111,9 +111,6 @@ Scenario: Upgrade group to new metadata and back - always install new packages
| install-group | A-mandatory-0:1.0-1.x86_64 |
| install-group | A-default-0:1.0-1.x86_64 |
| install-group | A-conditional-true-0:1.0-1.x86_64 |
- | remove | B-mandatory-0:1.0-1.x86_64 |
- | remove | B-default-0:1.0-1.x86_64 |
- | remove | B-conditional-true-0:1.0-1.x86_64 |
| group-upgrade | AB-group |
@@ -162,7 +159,6 @@ Scenario: Upgrade environment when there are new groups/packages - install new g
| install-group | B-default-0:1.0-1.x86_64 |
| install-group | B-conditional-true-0:1.0-1.x86_64 |
| group-install | B-group |
- | group-remove | A-group - repo#1 |
| env-upgrade | AB-environment |
@@ -213,7 +209,6 @@ Scenario: Upgrade environment to new metadata and back - always install new grou
| install-group | B-default-0:1.0-1.x86_64 |
| install-group | B-conditional-true-0:1.0-1.x86_64 |
| group-install | B-group |
- | group-remove | A-group - repo#1 |
| env-upgrade | AB-environment |
Given I drop repository "comps-upgrade-2"
And I use repository "comps-upgrade-1"
@@ -225,10 +220,6 @@ Scenario: Upgrade environment to new metadata and back - always install new grou
| install-group | A-default-0:1.0-1.x86_64 |
| install-group | A-conditional-true-0:1.0-1.x86_64 |
| group-install | A-group - repo#1 |
- | group-remove | B-group |
- | remove | B-mandatory-0:1.0-1.x86_64 |
- | remove | B-default-0:1.0-1.x86_64 |
- | remove | B-conditional-true-0:1.0-1.x86_64 |
| env-upgrade | AB-environment |
@@ -319,3 +310,37 @@ Scenario: Upgrade nonexistent and existent group
And Transaction is following
| Action | Package |
| group-upgrade | empty-group |
+
+
+Scenario: Upgrade group and a package that was removed from the group at the same time
+ Given I successfully execute dnf with args "group install AB-group"
+ And I drop repository "comps-upgrade-1"
+ And I use repository "comps-upgrade-2"
+ When I execute dnf with args "upgrade @AB-group A-mandatory"
+ Then the exit code is 0
+ And DNF Transaction is following
+ | Action | Package |
+ | upgrade | A-mandatory-0:2.0-1.x86_64 |
+ | install-group | B-mandatory-0:1.0-1.x86_64 |
+ | install-group | B-default-0:1.0-1.x86_64 |
+ | install-group | B-conditional-true-0:1.0-1.x86_64 |
+ | group-upgrade | AB-group |
+
+
+Scenario: Upgrade environment and a group that was removed from the environment at the same time
+ Given I successfully execute dnf with args "group install AB-environment"
+ And I drop repository "comps-upgrade-1"
+ And I use repository "comps-upgrade-2"
+ When I execute dnf with args "group upgrade AB-environment a-group"
+ Then the exit code is 0
+ And DNF Transaction is following
+ | Action | Package |
+ | upgrade | A-mandatory-0:2.0-1.x86_64 |
+ | upgrade | A-default-0:2.0-1.x86_64 |
+ | upgrade | A-conditional-true-0:2.0-1.x86_64 |
+ | install-group | B-mandatory-0:1.0-1.x86_64 |
+ | install-group | B-default-0:1.0-1.x86_64 |
+ | install-group | B-conditional-true-0:1.0-1.x86_64 |
+ | group-upgrade | A-group - repo#2 |
+ | group-install | B-group |
+ | env-upgrade | AB-environment |
diff --git a/dnf-behave-tests/dnf/plugins-core/system-upgrade-comps.feature b/dnf-behave-tests/dnf/system-upgrade-comps.feature
similarity index 78%
rename from dnf-behave-tests/dnf/plugins-core/system-upgrade-comps.feature
rename to dnf-behave-tests/dnf/system-upgrade-comps.feature
index c3fe0d7f5..add0ab798 100644
--- a/dnf-behave-tests/dnf/plugins-core/system-upgrade-comps.feature
+++ b/dnf-behave-tests/dnf/system-upgrade-comps.feature
@@ -1,5 +1,4 @@
# Reported as https://github.com/rpm-software-management/dnf5/issues/1817
-@xfail
@use.with_os=fedora__ge__31
Feature: Test the system-upgrade plugin with comps
@@ -23,7 +22,7 @@ Scenario: Upgrade group when there are new package versions - upgrade packages
| group-upgrade | A-group |
Given I successfully execute dnf with args "system-upgrade reboot"
And I stop http server for repository "system-upgrade-comps-f$releasever"
- When I execute dnf with args "system-upgrade upgrade"
+ When I execute dnf with args "offline _execute"
Then the exit code is 0
And transaction is following
| Action | Package |
@@ -49,7 +48,7 @@ Scenario: Upgrade group when there are new packages - install new packages
| group-upgrade | AB-group |
Given I successfully execute dnf with args "system-upgrade reboot"
And I stop http server for repository "system-upgrade-comps-f$releasever"
- When I execute dnf with args "system-upgrade upgrade"
+ When I execute dnf with args "offline _execute"
Then the exit code is 0
And transaction is following
| Action | Package |
@@ -73,7 +72,7 @@ Scenario: Upgrade group when there were excluded packages during installation -
| group-upgrade | A-group |
Given I successfully execute dnf with args "system-upgrade reboot"
And I stop http server for repository "system-upgrade-comps-f$releasever"
- When I execute dnf with args "system-upgrade upgrade"
+ When I execute dnf with args "offline _execute"
Then the exit code is 0
And transaction is following
| Action | Package |
@@ -94,7 +93,7 @@ Scenario: Upgrade group when there were removed packages since installation - do
| group-upgrade | A-group |
Given I successfully execute dnf with args "system-upgrade reboot"
And I stop http server for repository "system-upgrade-comps-f$releasever"
- When I execute dnf with args "system-upgrade upgrade"
+ When I execute dnf with args "offline _execute"
Then the exit code is 0
And transaction is following
| Action | Package |
@@ -120,7 +119,7 @@ Scenario: Upgrade environment when there are new groups/packages - install new g
| env-upgrade | AB-environment |
Given I successfully execute dnf with args "system-upgrade reboot"
And I stop http server for repository "system-upgrade-comps-f$releasever"
- When I execute dnf with args "system-upgrade upgrade"
+ When I execute dnf with args "offline _execute"
Then the exit code is 0
And transaction is following
| Action | Package |
@@ -147,7 +146,7 @@ Scenario: Upgrade environment when there were excluded packages during installat
| env-upgrade | A-environment |
Given I successfully execute dnf with args "system-upgrade reboot"
And I stop http server for repository "system-upgrade-comps-f$releasever"
- When I execute dnf with args "system-upgrade upgrade"
+ When I execute dnf with args "offline _execute"
Then the exit code is 0
And transaction is following
| Action | Package |
@@ -170,7 +169,7 @@ Scenario: Upgrade environment when there were removed packages since installatio
| env-upgrade | A-environment |
Given I successfully execute dnf with args "system-upgrade reboot"
And I stop http server for repository "system-upgrade-comps-f$releasever"
- When I execute dnf with args "system-upgrade upgrade"
+ When I execute dnf with args "offline _execute"
Then the exit code is 0
And transaction is following
| Action | Package |
@@ -191,7 +190,7 @@ Scenario: Upgrade empty group
| group-upgrade | empty-group |
Given I successfully execute dnf with args "system-upgrade reboot"
And I stop http server for repository "system-upgrade-comps-f$releasever"
- When I execute dnf with args "system-upgrade upgrade"
+ When I execute dnf with args "offline _execute"
Then the exit code is 0
And transaction is following
| Action | Package |
@@ -211,7 +210,7 @@ Scenario: Upgrade empty environment
| env-upgrade | empty-environment |
Given I successfully execute dnf with args "system-upgrade reboot"
And I stop http server for repository "system-upgrade-comps-f$releasever"
- When I execute dnf with args "system-upgrade upgrade"
+ When I execute dnf with args "offline _execute"
Then the exit code is 0
And transaction is following
| Action | Package |
@@ -232,8 +231,60 @@ Scenario: Upgrade environment when all groups are removed
| env-upgrade | A-environment |
Given I successfully execute dnf with args "system-upgrade reboot"
And I stop http server for repository "system-upgrade-comps-f$releasever"
- When I execute dnf with args "system-upgrade upgrade"
+ When I execute dnf with args "offline _execute"
Then the exit code is 0
And transaction is following
| Action | Package |
| env-upgrade | A-environment |
+
+
+Scenario: Upgrade groups with conflicting requests (packages are not removed)
+ Given I successfully execute dnf with args "group install C-group D-group"
+ And I set releasever to "30"
+ And I use repository "system-upgrade-comps-f$releasever" as http
+ And I set environment variable "DNF_SYSTEM_UPGRADE_NO_REBOOT" to "1"
+ When I execute dnf with args "system-upgrade download"
+ Then the exit code is 0
+ And DNF Transaction is following
+ | Action | Package |
+ | upgrade | A-mandatory-0:2.0-1.x86_64 |
+ | upgrade | A-default-0:2.0-1.x86_64 |
+ | group-upgrade | C-group |
+ | group-upgrade | D-group |
+ Given I successfully execute dnf with args "system-upgrade reboot"
+ And I stop http server for repository "system-upgrade-comps-f$releasever"
+ When I execute dnf with args "offline _execute"
+ Then the exit code is 0
+ And transaction is following
+ | Action | Package |
+ | upgrade | A-mandatory-0:2.0-1.x86_64 |
+ | upgrade | A-default-0:2.0-1.x86_64 |
+ | group-upgrade | C-group |
+ | group-upgrade | D-group |
+
+
+Scenario: Upgrade environments with conflicting requests (groups are not removed)
+ Given I successfully execute dnf with args "group install C-environment D-environment"
+ And I set releasever to "30"
+ And I use repository "system-upgrade-comps-f$releasever" as http
+ And I set environment variable "DNF_SYSTEM_UPGRADE_NO_REBOOT" to "1"
+ When I execute dnf with args "system-upgrade download"
+ Then the exit code is 0
+ And DNF Transaction is following
+ | Action | Package |
+ | upgrade | A-mandatory-0:2.0-1.x86_64 |
+ | upgrade | A-default-0:2.0-1.x86_64 |
+ | group-upgrade | A-group |
+ | env-upgrade | C-environment |
+ | env-upgrade | D-environment |
+ Given I successfully execute dnf with args "system-upgrade reboot"
+ And I stop http server for repository "system-upgrade-comps-f$releasever"
+ When I execute dnf with args "offline _execute"
+ Then the exit code is 0
+ And transaction is following
+ | Action | Package |
+ | upgrade | A-mandatory-0:2.0-1.x86_64 |
+ | upgrade | A-default-0:2.0-1.x86_64 |
+ | group-upgrade | A-group |
+ | env-upgrade | C-environment |
+ | env-upgrade | D-environment |
diff --git a/dnf-behave-tests/fixtures/specs/system-upgrade-comps-f29/comps.xml b/dnf-behave-tests/fixtures/specs/system-upgrade-comps-f29/comps.xml
index 32262a383..82bc2bd5a 100644
--- a/dnf-behave-tests/fixtures/specs/system-upgrade-comps-f29/comps.xml
+++ b/dnf-behave-tests/fixtures/specs/system-upgrade-comps-f29/comps.xml
@@ -76,4 +76,52 @@
+
+ C-group
+ false
+ true
+ 1024
+ C-group
+ Testgroup for DNF CI testing
+
+ A-mandatory
+ A-default
+ A-optional
+
+
+
+
+ D-group
+ false
+ true
+ 1024
+ D-group
+ Testgroup for DNF CI testing
+
+
+
+
+
+ C-environment
+ false
+ true
+ 1024
+ C-environment
+ Testenvironment for DNF CI testing
+
+ A-group
+
+
+
+
+ D-environment
+ false
+ true
+ 1024
+ D-environment
+ Testenvironment for DNF CI testing
+
+
+
+
diff --git a/dnf-behave-tests/fixtures/specs/system-upgrade-comps-f30/comps.xml b/dnf-behave-tests/fixtures/specs/system-upgrade-comps-f30/comps.xml
index efae37c8a..d959812bf 100644
--- a/dnf-behave-tests/fixtures/specs/system-upgrade-comps-f30/comps.xml
+++ b/dnf-behave-tests/fixtures/specs/system-upgrade-comps-f30/comps.xml
@@ -90,4 +90,52 @@
+
+ C-group
+ false
+ true
+ 1024
+ C-group
+ Testgroup for DNF CI testing
+
+
+
+
+
+ D-group
+ false
+ true
+ 1024
+ D-group
+ Testgroup for DNF CI testing
+
+ A-mandatory
+ A-default
+ A-optional
+
+
+
+
+ C-environment
+ false
+ true
+ 1024
+ C-environment
+ Testenvironment for DNF CI testing
+
+
+
+
+
+ D-environment
+ false
+ true
+ 1024
+ D-environment
+ Testenvironment for DNF CI testing
+
+ A-group
+
+
+