From 4a407eba5433603b1bd3d6bee3f6b93f3c3c6930 Mon Sep 17 00:00:00 2001 From: m00g3n Date: Wed, 27 Mar 2024 14:30:50 +0100 Subject: [PATCH] test dns issue on GHA --- .../workflows/kyma-integration-k3d-agent-tests.yml | 11 ++++++++++- tests/Makefile.test-compass-runtime-agent | 2 +- tests/scripts/fetch-test-logs.sh | 5 +++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/kyma-integration-k3d-agent-tests.yml b/.github/workflows/kyma-integration-k3d-agent-tests.yml index a2aef9d6..9a569da9 100644 --- a/.github/workflows/kyma-integration-k3d-agent-tests.yml +++ b/.github/workflows/kyma-integration-k3d-agent-tests.yml @@ -6,6 +6,7 @@ on: jobs: test: runs-on: ubuntu-latest + environment: compass-runtime-agent steps: - uses: azure/setup-helm@v4.1.0 id: install @@ -26,8 +27,16 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- + - name: test + env: + COMPASS_HOST: ${{ secrets.COMPASS_HOST }} + run: | + echo $COMPASS_HOST - name: Run unit tests - run: make -C tests/hack/ci k3d-agent-tests + env: + COMPASS_CLIENT_ID: ${{ secrets.COMPASS_CLIENT_ID }} + COMPASS_CLIENT_SECRET: ${{ secrets.COMPASS_CLIENT_SECRET }} + run: make -C tests/hack/ci k3d-agent-tests COMPASS_HOST=${{ secrets.COMPASS_HOST }} - name: Archive test results if: always() uses: actions/upload-artifact@v4 diff --git a/tests/Makefile.test-compass-runtime-agent b/tests/Makefile.test-compass-runtime-agent index 8389c559..4f416273 100644 --- a/tests/Makefile.test-compass-runtime-agent +++ b/tests/Makefile.test-compass-runtime-agent @@ -3,7 +3,7 @@ NAMESPACE ?= test GOPATH ?= $(shell go env GOPATH) DIRECTOR_URL=https://compass-gateway-auth-oauth.$(COMPASS_HOST)/director/graphql -TOKENS_ENDPOINT=https://oauth2.${COMPASS_HOST}/oauth2/token +TOKENS_ENDPOINT=https://oauth2.$(COMPASS_HOST)/oauth2/token TEST_TIMEOUT = "4m" CLUSTER_NAME ?= kyma diff --git a/tests/scripts/fetch-test-logs.sh b/tests/scripts/fetch-test-logs.sh index e6cffc5c..96fde6f3 100755 --- a/tests/scripts/fetch-test-logs.sh +++ b/tests/scripts/fetch-test-logs.sh @@ -14,7 +14,7 @@ function fetch_tests() { fi local LOGS_OUT=${2:-${PWD}} local NAMESPACE=${3:-test} - local TEST_TIMEOUT=${4:-900s} + local TEST_TIMEOUT=${4:-300s} # wait for the job to finish kubectl wait job/$JOB_NAME \ -n $NAMESPACE \ @@ -31,5 +31,6 @@ function fetch_tests() { exit $__job_result__ } +echo "host:"$COMPASS_HOST + fetch_tests $@ -