|
| 1 | +Feature: Group and environment upgrade |
| 2 | + |
| 3 | +# comps-upgrade-1 repo: |
| 4 | +# a-group: |
| 5 | +# mandatory: A-mandatory |
| 6 | +# default: A-default |
| 7 | +# optional: A-optional |
| 8 | +# conditional: A-conditional-true (if dummy), A-conditional-false (if nonexistent) |
| 9 | +# AB-group: |
| 10 | +# mandatory: A-mandatory |
| 11 | +# default: A-default |
| 12 | +# optional: A-optional |
| 13 | +# conditional: A-conditional-true (if dummy), A-conditional-false (if nonexistent) |
| 14 | +# AB-environment: |
| 15 | +# grouplist: a-group |
| 16 | +# empty-group |
| 17 | +# empty-environment |
| 18 | +# optional-environment |
| 19 | +# optionlist: a-group |
| 20 | + |
| 21 | +Scenario: Fail to install excluded group |
| 22 | + Given I use repository "comps-upgrade-1" |
| 23 | + When I execute dnf with args "group install a-group --setopt=excludegroups=a-group" |
| 24 | + Then the exit code is 1 |
| 25 | + And Transaction is empty |
| 26 | + And stderr contains "No match for argument: a-group" |
| 27 | + |
| 28 | +Scenario: Fail to install excluded environment |
| 29 | + Given I use repository "comps-upgrade-1" |
| 30 | + When I execute dnf with args "group install AB-environment --setopt=excludeenvs=AB-environment" |
| 31 | + Then the exit code is 1 |
| 32 | + And Transaction is empty |
| 33 | + And stderr contains "No match for argument: AB-environment" |
| 34 | + |
| 35 | +Scenario: Install an environment when some of its groups are excluded |
| 36 | + Given I use repository "comps-upgrade-1" |
| 37 | + When I execute dnf with args "group install AC-environment --setopt=excludegroups=a-group" |
| 38 | + Then the exit code is 0 |
| 39 | + And Transaction is following |
| 40 | + | Action | Package | |
| 41 | + | install-group | C-mandatory-0:1.0-1.x86_64 | |
| 42 | + | group-install | C-group | |
| 43 | + | env-install | AC-environment | |
| 44 | + |
| 45 | +Scenario: Install an environment when all of its groups are excluded |
| 46 | + Given I use repository "comps-upgrade-1" |
| 47 | + When I execute dnf with args "group install AC-environment --setopt=excludegroups=a-group,C-group" |
| 48 | + Then the exit code is 0 |
| 49 | + And Transaction is following |
| 50 | + | Action | Package | |
| 51 | + | env-install | AC-environment | |
| 52 | + |
| 53 | +Scenario: Install comps that are not excluded |
| 54 | + Given I use repository "comps-upgrade-1" |
| 55 | + When I execute dnf with args "group install *-group *-environment --setopt=excludegroups=a-group --setopt=excludeenvs=AB-environment" |
| 56 | + Then the exit code is 0 |
| 57 | + And Transaction is following |
| 58 | + | Action | Package | |
| 59 | + | install-group | A-mandatory-0:1.0-1.x86_64 | |
| 60 | + | install-group | A-default-0:1.0-1.x86_64 | |
| 61 | + | install-group | C-mandatory-0:1.0-1.x86_64 | |
| 62 | + | group-install | AB-group | |
| 63 | + | group-install | C-group | |
| 64 | + | group-install | empty-group | |
| 65 | + | env-install | empty-environment | |
| 66 | + | env-install | optional-environment | |
| 67 | + | env-install | AC-environment | |
| 68 | + |
| 69 | +Scenario: Install comps when there are non-existent excluded comps |
| 70 | + Given I use repository "comps-upgrade-1" |
| 71 | + When I execute dnf with args "group install a-group AB-environment --setopt=excludegroups=nonexistent-group --setopt=excludeenvs=nonexistent-environment" |
| 72 | + Then the exit code is 0 |
| 73 | + And Transaction is following |
| 74 | + | Action | Package | |
| 75 | + | install-group | A-mandatory-0:1.0-1.x86_64 | |
| 76 | + | install-group | A-default-0:1.0-1.x86_64 | |
| 77 | + | group-install | A-group - repo#1 | |
| 78 | + | env-install | AB-environment | |
| 79 | + |
| 80 | +Scenario: Install a group when it's excluded but all excludes are disabled |
| 81 | + Given I use repository "comps-upgrade-1" |
| 82 | + When I execute dnf with args "group install a-group --setopt=excludegroups=a-group --setopt=disable_excludes=*" |
| 83 | + Then the exit code is 0 |
| 84 | + And Transaction is following |
| 85 | + | Action | Package | |
| 86 | + | install-group | A-mandatory-0:1.0-1.x86_64 | |
| 87 | + | install-group | A-default-0:1.0-1.x86_64 | |
| 88 | + | group-install | A-group - repo#1 | |
| 89 | + |
| 90 | +Scenario: Install an environment when it's excluded but all excludes are disabled |
| 91 | + Given I use repository "comps-upgrade-1" |
| 92 | + When I execute dnf with args "group install empty-environment --setopt=excludeenvs=empty-environment --setopt=disable_excludes=*" |
| 93 | + Then the exit code is 0 |
| 94 | + And Transaction is following |
| 95 | + | Action | Package | |
| 96 | + | env-install | empty-environment | |
| 97 | + |
| 98 | +Scenario: Install a group when it's excluded but main excludes are disabled |
| 99 | + Given I use repository "comps-upgrade-1" |
| 100 | + When I execute dnf with args "group install a-group --setopt=excludegroups=a-group --setopt=disable_excludes=main" |
| 101 | + Then the exit code is 0 |
| 102 | + And Transaction is following |
| 103 | + | Action | Package | |
| 104 | + | install-group | A-mandatory-0:1.0-1.x86_64 | |
| 105 | + | install-group | A-default-0:1.0-1.x86_64 | |
| 106 | + | group-install | A-group - repo#1 | |
| 107 | + |
| 108 | +Scenario: Install an environment when it's excluded but main excludes are disabled |
| 109 | + Given I use repository "comps-upgrade-1" |
| 110 | + When I execute dnf with args "group install empty-environment --setopt=excludeenvs=empty-environment --setopt=disable_excludes=main" |
| 111 | + Then the exit code is 0 |
| 112 | + And Transaction is following |
| 113 | + | Action | Package | |
| 114 | + | env-install | empty-environment | |
| 115 | + |
| 116 | +Scenario: Fail to install a group when it's excluded, even though repo excludes are disabled |
| 117 | + Given I use repository "comps-upgrade-1" |
| 118 | + When I execute dnf with args "group install a-group --setopt=excludegroups=a-group --setopt=disable_excludes=comps-upgrade-1" |
| 119 | + Then the exit code is 1 |
| 120 | + And Transaction is empty |
| 121 | + And stderr contains "No match for argument: a-group" |
| 122 | + |
| 123 | +Scenario: Fail to install an environment when it's excluded, even though repo excludes are disabled |
| 124 | + Given I use repository "comps-upgrade-1" |
| 125 | + When I execute dnf with args "group install empty-environment --setopt=excludeenvs=empty-environment --setopt=disable_excludes=comps-upgrade-1" |
| 126 | + Then the exit code is 1 |
| 127 | + And Transaction is empty |
| 128 | + And stderr contains "No match for argument: empty-environment" |
| 129 | + |
| 130 | +Scenario: Fail to install a group excluded using globs |
| 131 | + Given I use repository "comps-upgrade-1" |
| 132 | + When I execute dnf with args "group install a-group --setopt=excludegroups=a-*" |
| 133 | + Then the exit code is 1 |
| 134 | + And Transaction is empty |
| 135 | + And stderr contains "No match for argument: a-group" |
| 136 | + |
| 137 | +Scenario: Fail to install an environment excluded using globs |
| 138 | + Given I use repository "comps-upgrade-1" |
| 139 | + When I execute dnf with args "group install AB-environment --setopt=excludeenvs=AB-*" |
| 140 | + Then the exit code is 1 |
| 141 | + And Transaction is empty |
| 142 | + And stderr contains "No match for argument: AB-environment" |
| 143 | + |
| 144 | +Scenario: Install an environment when its group is excluded using globs |
| 145 | + Given I use repository "comps-upgrade-1" |
| 146 | + When I execute dnf with args "group install AB-environment --setopt=excludegroups=a-*" |
| 147 | + Then the exit code is 0 |
| 148 | + And Transaction is following |
| 149 | + | Action | Package | |
| 150 | + | env-install | AB-environment | |
0 commit comments