Skip to content

Commit 5d69ef3

Browse files
committed
Use newer container naming in container BATS
1 parent 165864c commit 5d69ef3

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

bats/fb-katello-container.bats

+10-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ load fixtures/content
1010
@test "try fetching container content" {
1111
tPackageExists podman || tPackageInstall podman
1212
podman login "${HOSTNAME}" -u admin -p changeme
13-
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}-${PRODUCT_LABEL}-${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
13+
if tIsVersionNewer "${KATELLO_VERSION}" 4.16
14+
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}/${PRODUCT_LABEL}/${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
15+
else
16+
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}-${PRODUCT_LABEL}-${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
17+
fi
1418
podman pull "${HOSTNAME}/${CONTAINER_PULL_LABEL}"
1519
}
1620

@@ -19,7 +23,11 @@ load fixtures/content
1923
tContainerPushSupported
2024
tPackageExists podman || tPackageInstall podman
2125
podman login "${HOSTNAME}" -u admin -p changeme
22-
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}-${PRODUCT_LABEL}-${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
26+
if tIsVersionNewer "${KATELLO_VERSION}" 4.16
27+
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}/${PRODUCT_LABEL}/${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
28+
else
29+
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}-${PRODUCT_LABEL}-${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
30+
fi
2331
CONTAINER_PUSH_LABEL=$(echo "${ORGANIZATION_LABEL}/${PRODUCT_LABEL}/${CONTAINER_REPOSITORY_LABEL}-bats-$(date -u '+%s')"| tr '[:upper:]' '[:lower:]')
2432
podman push "${HOSTNAME}/${CONTAINER_PULL_LABEL}" "${HOSTNAME}/${CONTAINER_PUSH_LABEL}"
2533
# Sleep for 5 seconds due to an intermittent issue where pushed content

bats/foreman_helper.bash

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ tSkipIfOlderThan43() {
4848

4949
tContainerPushSupported() {
5050
KATELLO_VERSION=$(tKatelloVersion)
51-
if ! tIsVersionNewer "${KATELLO_VERSION}" 4.15; then
52-
skip "Container push is only supported on Katello 4.15+"
51+
if ! tIsVersionNewer "${KATELLO_VERSION}" 4.14; then
52+
skip "Container push is only supported on Katello 4.14+"
5353
fi
5454
}
5555

0 commit comments

Comments
 (0)