Skip to content

Commit

Permalink
Pass branch from CI to Hub APi tests
Browse files Browse the repository at this point in the history
Update Hub API test execution to follow $GOLANG_TESTS_REF env variable
with setting the correct branch. This should avoid failures with
different Hub&CI release versions.

Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Maayan Hadasi <mguetta@redhat.com>
  • Loading branch information
aufi authored and mguetta1 committed Jan 31, 2024
1 parent f6b90ca commit c35a761
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hub-api/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
export BRANCH=$1
export HUB_TMP_DIR="/tmp/tackle2-hub-test"

# Upstream CI hack to use golang test ref input as branch for tests for releases.
if [ ! -z $GOLANG_TESTS_REF ] && [[ $GOLANG_TESTS_REF == release-* ]]; then
echo "Using branch '${GOLANG_TESTS_REF}' for Hub API tests."
export BRANCH=$GOLANG_TESTS_REF
fi

if [ -z $BRANCH ]; then
echo "Assuming 'main' branch to be used for Hub."
export BRANCH="main"
Expand Down

0 comments on commit c35a761

Please sign in to comment.