From a09272eff7ebbb5e6fc96683495a703edaf8e8d7 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Wed, 27 Dec 2023 15:10:54 -0800 Subject: [PATCH] Enable running tests with --endpoint flag. (#2729) * Enable running tests with --endpoint flag. * Use the correct flag name. --- scripts/run-static-canary.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/run-static-canary.sh b/scripts/run-static-canary.sh index 91087b06cd..9d07434847 100755 --- a/scripts/run-static-canary.sh +++ b/scripts/run-static-canary.sh @@ -10,6 +10,13 @@ GINKGO_TEST_BUILD="$SCRIPT_DIR/../test/build" # TEST_IMAGE_REGISTRY is the registry in test-infra-* accounts where e2e test images are stored TEST_IMAGE_REGISTRY=${TEST_IMAGE_REGISTRY:-"617930562442.dkr.ecr.us-west-2.amazonaws.com"} +# If $ENDPOINT is set, as in it is for beta clusters, then add the --endpoint flag to the ginkgo test command +ENDPOINT_FLAG="" +if [ -n "$ENDPOINT" ]; then + ENDPOINT_FLAG="--eks-endpoint=$ENDPOINT" +fi + + source "$SCRIPT_DIR"/lib/cluster.sh source "$SCRIPT_DIR"/lib/canary.sh @@ -24,11 +31,12 @@ function run_ginkgo_test() { --aws-vpc-id="$VPC_ID" \ --ng-name-label-key="kubernetes.io/os" \ --ng-name-label-val="linux" \ - --test-image-registry=$TEST_IMAGE_REGISTRY) + --test-image-registry=$TEST_IMAGE_REGISTRY \ + "$ENDPOINT_FLAG") } load_cluster_details run_ginkgo_test "STATIC_CANARY" -echo "all tests ran successfully in $(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds" \ No newline at end of file +echo "all tests ran successfully in $(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds"