|
| 1 | +Feature: DNF allow_vendor_change defaults to false |
| 2 | +Background: |
| 3 | + Given I use repository "dnf-ci-vendor-1" |
| 4 | + And I configure dnf with |
| 5 | + | key | value | |
| 6 | + | allow_vendor_change | False | |
| 7 | + And I successfully execute dnf with args "install vendor" |
| 8 | + Then the exit code is 0 |
| 9 | + And Transaction is following |
| 10 | + | Action | Package | |
| 11 | + | install | vendor-1.0-1.x86_64 | |
| 12 | + |
| 13 | + Given I successfully execute rpm with args "-qi vendor" |
| 14 | + Then the exit code is 0 |
| 15 | + And stdout contains "Vendor : First Vendor" |
| 16 | + |
| 17 | + |
| 18 | +Scenario: Upgrade sticks to vendor by default |
| 19 | + Given I use repository "dnf-ci-vendor-1-updates" |
| 20 | + Given I use repository "dnf-ci-vendor-2-updates" |
| 21 | + When I execute dnf with args "upgrade vendor" |
| 22 | + Then the exit code is 0 |
| 23 | + And Transaction is following |
| 24 | + | Action | Package | |
| 25 | + | upgrade | vendor-1.1-1.x86_64 | |
| 26 | + Given I successfully execute rpm with args "-qi vendor" |
| 27 | + Then the exit code is 0 |
| 28 | + And stdout contains "Vendor : First Vendor" |
| 29 | + |
| 30 | + |
| 31 | +Scenario: No upgrade if same vendor not found by default |
| 32 | + Given I use repository "dnf-ci-vendor-2-updates" |
| 33 | + When I execute dnf with args "upgrade vendor" |
| 34 | + Then the exit code is 0 |
| 35 | + And Transaction is empty |
| 36 | + Given I successfully execute rpm with args "-qi vendor" |
| 37 | + Then the exit code is 0 |
| 38 | + And stdout contains "Vendor : First Vendor" |
| 39 | + |
| 40 | + |
| 41 | +Scenario: Hint shown when vendor change blocked by default |
| 42 | + Given I use repository "dnf-ci-vendor-1-updates" |
| 43 | + When I execute dnf with args "upgrade vendor" |
| 44 | + Given I drop repository "dnf-ci-vendor-1" |
| 45 | + Given I use repository "dnf-ci-vendor-2" |
| 46 | + When I execute dnf with args "downgrade vendor" |
| 47 | + Then the exit code is 1 |
| 48 | + And Transaction is empty |
| 49 | + And stdout is empty |
| 50 | + And stderr contains "--setopt=allow_vendor_change=true to allow changing package vendors" |
| 51 | + |
| 52 | + |
| 53 | +Scenario: Override default with --setopt=allow_vendor_change=true |
| 54 | + Given I use repository "dnf-ci-vendor-1-updates" |
| 55 | + Given I use repository "dnf-ci-vendor-2-updates" |
| 56 | + When I execute dnf with args "upgrade --setopt=allow_vendor_change=true vendor" |
| 57 | + Then the exit code is 0 |
| 58 | + And Transaction is following |
| 59 | + | Action | Package | |
| 60 | + | upgrade | vendor-1.2-1.x86_64 | |
| 61 | + Given I successfully execute rpm with args "-qi vendor" |
| 62 | + Then the exit code is 0 |
| 63 | + And stdout contains "Vendor : Second Vendor" |
0 commit comments