From 67d23f2ba21daf02589949191d0f6d7084bad385 Mon Sep 17 00:00:00 2001 From: Josh Wolf Date: Tue, 23 Jan 2024 16:45:40 -0500 Subject: [PATCH] add an excludelang opt for pulumi tests Signed-off-by: Josh Wolf --- images/pulumi/tests/02-k8s-install-all-languages.sh | 4 ++++ images/pulumi/tests/main.tf | 3 +++ 2 files changed, 7 insertions(+) diff --git a/images/pulumi/tests/02-k8s-install-all-languages.sh b/images/pulumi/tests/02-k8s-install-all-languages.sh index aac79800d8..717363624f 100755 --- a/images/pulumi/tests/02-k8s-install-all-languages.sh +++ b/images/pulumi/tests/02-k8s-install-all-languages.sh @@ -3,6 +3,7 @@ set -o errexit -o errtrace -o pipefail -x ONLY_TEST_LANG="${ONLY_TEST_LANG:-}" +EXCLUDE_LANG="${EXCLUDE_LANG:-}" K3S_IP="$(docker ps | grep 'k3d-k3s-default-server-0' | awk '{print $1}' | xargs docker inspect | jq -r '.[0].NetworkSettings.Networks["k3d-k3s-default"].IPAddress')" if [[ "${K3S_IP}" == "" ]]; then @@ -89,6 +90,9 @@ function main { if [[ "${ONLY_TEST_LANG}" != "" && "${lang}" != "${ONLY_TEST_LANG}" ]]; then continue fi + if [[ -n "${EXCLUDE_LANG}" && "${EXCLUDE_LANG}" == *"${lang}"* ]]; then + continue + fi (set +x && echo "---------- BEGIN TESTING SUPPORT FOR LANGUAGE: ${lang} ----------") k="${lang}-${d}" k8s_cleanup "${lang}" "${k}" diff --git a/images/pulumi/tests/main.tf b/images/pulumi/tests/main.tf index 3fb77a387a..7dec9c1bff 100644 --- a/images/pulumi/tests/main.tf +++ b/images/pulumi/tests/main.tf @@ -17,4 +17,7 @@ data "oci_exec_test" "install" { digest = var.digest script = "${path.module}/02-k8s-install-all-languages.sh" timeout_seconds = 10 * 60 + env = { + "EXCLUDE_LANG" = "java" + } }