diff --git a/Makefile b/Makefile index 0551d1b..c256850 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ PLATFORMS ?= linux_amd64 UP_VERSION = v0.14.0 UP_CHANNEL = stable -UPTEST_VERSION = v0.2.0 +UPTEST_VERSION = v0.2.1 -include build/makelib/k8s_tools.mk # ==================================================================================== @@ -54,9 +54,16 @@ build.init: $(UP) # ==================================================================================== # End to End Testing -uptest: build $(UPTEST) $(KUBECTL) $(KUTTL) local.xpkg.deploy.configuration.$(PROJECT_NAME) + +# This target requires the following environment variables to be set: +# - UPTEST_CLOUD_CREDENTIALS, cloud credentials for the provider being tested, e.g. export UPTEST_CLOUD_CREDENTIALS=$(cat gcp-sa.json) +uptest: $(UPTEST) $(KUBECTL) $(KUTTL) @$(INFO) running automated tests @KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) $(UPTEST) e2e examples/cluster-claim.yaml,examples/postgres-claim.yaml --setup-script=test/setup.sh --default-timeout=3600 || $(FAIL) @$(OK) running automated tests -e2e: controlplane.up uptest +# This target requires the following environment variables to be set: +# - UPTEST_CLOUD_CREDENTIALS, cloud credentials for the provider being tested, e.g. export UPTEST_CLOUD_CREDENTIALS=$(cat gcp-sa.json) +e2e: build controlplane.up local.xpkg.deploy.configuration.$(PROJECT_NAME) uptest + +.PHONY: uptest e2e \ No newline at end of file diff --git a/test/setup.sh b/test/setup.sh index 717abd8..87fa138 100755 --- a/test/setup.sh +++ b/test/setup.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -aeuo pipefail -UPTEST_GCP_PROJECT=${UPTEST_GCP_PROJECT:-crossplane-playground} +UPTEST_GCP_PROJECT=${UPTEST_GCP_PROJECT:-official-provider-testing} echo "Running setup.sh" echo "Waiting until configuration package is healthy/installed..." @@ -9,7 +9,7 @@ ${KUBECTL} wait configuration.pkg platform-ref-gcp --for=condition=Healthy --tim ${KUBECTL} wait configuration.pkg platform-ref-gcp --for=condition=Installed --timeout 5m echo "Creating cloud credential secret..." -${KUBECTL} -n upbound-system create secret generic gcp-creds --from-literal=credentials="${UPTEST_GCP_CREDS}" \ +${KUBECTL} -n upbound-system create secret generic gcp-creds --from-literal=credentials="${UPTEST_CLOUD_CREDENTIALS}" \ --dry-run=client -o yaml | ${KUBECTL} apply -f - echo "Waiting until provider-gcp is healthy..."