diff --git a/dnf-behave-tests/dnf/module/enable-errors.feature b/dnf-behave-tests/dnf/module/enable-errors.feature index 7d012e9c6..76158e68c 100644 --- a/dnf-behave-tests/dnf/module/enable-errors.feature +++ b/dnf-behave-tests/dnf/module/enable-errors.feature @@ -5,8 +5,8 @@ Background: Given I use repository "dnf-ci-fedora-modular-updates" -Scenario: Fail to enable a different stream of an already enabled module (dnf) - Given I set dnf command to "dnf" +@dnf5 +Scenario: Fail to enable a different stream of an already enabled module When I execute dnf with args "module enable nodejs:8" Then the exit code is 0 And Transaction is following @@ -22,32 +22,11 @@ Scenario: Fail to enable a different stream of an already enabled module (dnf) | nodejs | enabled | 8 | | And stderr is """ + Failed to resolve the transaction: The operation would result in switching of module 'nodejs' stream '8' to stream '10' Error: It is not possible to switch enabled streams of a module unless explicitly enabled via configuration option module_stream_switch. - It is recommended to rather remove all installed content from the module, and reset the module using 'dnf module reset ' command. After you reset the module, you can install the other stream. """ -Scenario: Fail to enable a different stream of an already enabled module (yum) - Given I set dnf command to "yum" - When I execute dnf with args "module enable nodejs:8" - Then the exit code is 0 - And Transaction is following - | Action | Package | - | module-stream-enable | nodejs:8 | - And modules state is following - | Module | State | Stream | Profiles | - | nodejs | enabled | 8 | | - When I execute dnf with args "module enable nodejs:10" - Then the exit code is 1 - And modules state is following - | Module | State | Stream | Profiles | - | nodejs | enabled | 8 | | - And stderr is - """ - The operation would result in switching of module 'nodejs' stream '8' to stream '10' - Error: It is not possible to switch enabled streams of a module unless explicitly enabled via configuration option module_stream_switch. - It is recommended to rather remove all installed content from the module, and reset the module using 'yum module reset ' command. After you reset the module, you can install the other stream. - """ Scenario: Fail to install a different stream of an already enabled module Given I set dnf command to "dnf" @@ -68,7 +47,6 @@ Scenario: Fail to install a different stream of an already enabled module """ The operation would result in switching of module 'nodejs' stream '8' to stream '10' Error: It is not possible to switch enabled streams of a module unless explicitly enabled via configuration option module_stream_switch. - It is recommended to rather remove all installed content from the module, and reset the module using 'dnf module reset ' command. After you reset the module, you can install the other stream. """ @@ -92,7 +70,6 @@ Scenario: Fail to install a different stream of an already enabled module using """ The operation would result in switching of module 'nodejs' stream '8' to stream '10' Error: It is not possible to switch enabled streams of a module unless explicitly enabled via configuration option module_stream_switch. - It is recommended to rather remove all installed content from the module, and reset the module using 'dnf module reset ' command. After you reset the module, you can install the other stream. """ @dnf5 diff --git a/dnf-behave-tests/dnf/module/enable.feature b/dnf-behave-tests/dnf/module/enable.feature index 56b53f325..4acd9f45a 100644 --- a/dnf-behave-tests/dnf/module/enable.feature +++ b/dnf-behave-tests/dnf/module/enable.feature @@ -40,3 +40,26 @@ Scenario: Enable a module stream that was already enabled And modules state is following | Module | State | Stream | Profiles | | nodejs | enabled | 8 | | + + +@dnf5 +Scenario: Enable a different stream of an already enabled module when module_stream_switch=true + Given I configure dnf with + | key | value | + | module_stream_switch | True | + When I execute dnf with args "module enable nodejs:8" + Then the exit code is 0 + And Transaction is following + | Action | Package | + | module-stream-enable | nodejs:8 | + And modules state is following + | Module | State | Stream | Profiles | + | nodejs | enabled | 8 | | + When I execute dnf with args "module enable nodejs:10" + Then the exit code is 0 + And Transaction is following + | Action | Package | + | module-stream-switch | nodejs:8 -> 10 | + And modules state is following + | Module | State | Stream | Profiles | + | nodejs | enabled | 10 | |