Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 34 additions & 9 deletions dnf-behave-tests/dnf/comps-upgrade.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 |


Expand Down Expand Up @@ -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 |


Expand Down Expand Up @@ -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"
Expand All @@ -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 |


Expand Down Expand Up @@ -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 |
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |
48 changes: 48 additions & 0 deletions dnf-behave-tests/fixtures/specs/system-upgrade-comps-f29/comps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,52 @@
</grouplist>
</environment>

<group>
<id>C-group</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>C-group</name>
<description>Testgroup for DNF CI testing</description>
<packagelist>
<packagereq type="mandatory">A-mandatory</packagereq>
<packagereq type="default">A-default</packagereq>
<packagereq type="optional">A-optional</packagereq>
</packagelist>
</group>

<group>
<id>D-group</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>D-group</name>
<description>Testgroup for DNF CI testing</description>
<packagelist>
</packagelist>
</group>

<environment>
<id>C-environment</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>C-environment</name>
<description>Testenvironment for DNF CI testing</description>
<grouplist>
<groupid>A-group</groupid>
</grouplist>
</environment>

<environment>
<id>D-environment</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>D-environment</name>
<description>Testenvironment for DNF CI testing</description>
<grouplist>
</grouplist>
</environment>

</comps>
48 changes: 48 additions & 0 deletions dnf-behave-tests/fixtures/specs/system-upgrade-comps-f30/comps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,52 @@
</grouplist>
</environment>

<group>
<id>C-group</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>C-group</name>
<description>Testgroup for DNF CI testing</description>
<packagelist>
</packagelist>
</group>

<group>
<id>D-group</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>D-group</name>
<description>Testgroup for DNF CI testing</description>
<packagelist>
<packagereq type="mandatory">A-mandatory</packagereq>
<packagereq type="default">A-default</packagereq>
<packagereq type="optional">A-optional</packagereq>
</packagelist>
</group>

<environment>
<id>C-environment</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>C-environment</name>
<description>Testenvironment for DNF CI testing</description>
<grouplist>
</grouplist>
</environment>

<environment>
<id>D-environment</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>D-environment</name>
<description>Testenvironment for DNF CI testing</description>
<grouplist>
<groupid>A-group</groupid>
</grouplist>
</environment>

</comps>
Loading