Skip to content

Commit 5e46735

Browse files
jeremylenzclaude
authored andcommitted
Refs #39330 - Use label for content-view-environments activation key param
Use CONTENT_VIEW_LABEL (Test_CV) instead of CONTENT_VIEW (Test CV) for the --content-view-environments flag, which expects labels not names. Also fix label definitions in content.bash to use global replacement (// instead of /) so all spaces are replaced, not just the first. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7378c8f commit 5e46735

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

bats/fb-katello-content.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ setup() {
253253

254254
@test "create activation key" {
255255
hammer activation-key create --organization="${ORGANIZATION}" \
256-
--name="${ACTIVATION_KEY}" --content-view-environments="${LIFECYCLE_ENVIRONMENT}/${CONTENT_VIEW}" \
256+
--name="${ACTIVATION_KEY}" --content-view-environments="${LIFECYCLE_ENVIRONMENT}/${CONTENT_VIEW_LABEL}" \
257257
--unlimited-hosts | grep -q "Activation key created"
258258
}
259259

bats/fixtures/content.bash

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# vim: ft=sh:sw=2:et
2+
# shellcheck disable=SC2034
23

34
ORGANIZATION="Test Organization${ORG_SUFFIX}"
45
IMPORT_ORG="Import Organization${ORG_SUFFIX}"
@@ -25,13 +26,13 @@ FILTER1="errata excluder"
2526
FILTER2="rpm excluder"
2627
FILTER3="modulemd includer"
2728

28-
ORGANIZATION_LABEL="${ORGANIZATION/ /_}"
29-
PRODUCT_LABEL="${PRODUCT/ /_}"
30-
CONTAINER_REPOSITORY_LABEL="${CONTAINER_REPOSITORY/ /_}"
31-
FILE_REPOSITORY_LABEL="${FILE_REPOSITORY/ /_}"
32-
PUPPET_REPOSITORY_LABEL="${PUPPET_REPOSITORY/ /_}"
33-
YUM_REPOSITORY_LABEL="${YUM_REPOSITORY/ /_}"
34-
YUM_REPOSITORY_5_LABEL="${YUM_REPOSITORY_5/ /_}"
35-
LIFECYCLE_ENVIRONMENT_LABEL="${LIFECYCLE_ENVIRONMENT/ /_}"
36-
CONTENT_VIEW_LABEL="${CONTENT_VIEW/ /_}"
37-
ACTIVATION_KEY_LABEL="${ACTIVATION_KEY/ /_}"
29+
ORGANIZATION_LABEL="${ORGANIZATION// /_}"
30+
PRODUCT_LABEL="${PRODUCT// /_}"
31+
CONTAINER_REPOSITORY_LABEL="${CONTAINER_REPOSITORY// /_}"
32+
FILE_REPOSITORY_LABEL="${FILE_REPOSITORY// /_}"
33+
PUPPET_REPOSITORY_LABEL="${PUPPET_REPOSITORY// /_}"
34+
YUM_REPOSITORY_LABEL="${YUM_REPOSITORY// /_}"
35+
YUM_REPOSITORY_5_LABEL="${YUM_REPOSITORY_5// /_}"
36+
LIFECYCLE_ENVIRONMENT_LABEL="${LIFECYCLE_ENVIRONMENT// /_}"
37+
CONTENT_VIEW_LABEL="${CONTENT_VIEW// /_}"
38+
ACTIVATION_KEY_LABEL="${ACTIVATION_KEY// /_}"

0 commit comments

Comments
 (0)