Skip to content

Commit

Permalink
Check for Katello version properly for container tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ianballou committed Nov 26, 2024
1 parent 518b53b commit 7eed804
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion bats/fb-katello-client-global-registration.bats
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ load fixtures/content
@test "try fetching container content" {
tPackageExists podman || tPackageInstall podman
podman login "${HOSTNAME}" -u admin -p changeme
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}-${PRODUCT_LABEL}-${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
if tIsVersionNewer "$(tKatelloVersion)" 4.16; then
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}/${PRODUCT_LABEL}/${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
else
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}-${PRODUCT_LABEL}-${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
fi
podman pull "${HOSTNAME}/${CONTAINER_PULL_LABEL}"
}

Expand Down
4 changes: 2 additions & 2 deletions bats/fb-katello-container.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ load fixtures/content
@test "try fetching container content" {
tPackageExists podman || tPackageInstall podman
podman login "${HOSTNAME}" -u admin -p changeme
if tIsVersionNewer "${KATELLO_VERSION}" 4.16; then
if tIsVersionNewer "$(tKatelloVersion)" 4.16; then
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}/${PRODUCT_LABEL}/${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
else
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}-${PRODUCT_LABEL}-${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
Expand All @@ -23,7 +23,7 @@ load fixtures/content
tContainerPushSupported
tPackageExists podman || tPackageInstall podman
podman login "${HOSTNAME}" -u admin -p changeme
if tIsVersionNewer "${KATELLO_VERSION}" 4.16; then
if tIsVersionNewer "$(tKatelloVersion)" 4.16; then
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}/${PRODUCT_LABEL}/${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
else
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}-${PRODUCT_LABEL}-${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
Expand Down

0 comments on commit 7eed804

Please sign in to comment.