Skip to content

Commit

Permalink
add an excludelang opt for pulumi tests
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Wolf <josh@wolfs.io>
  • Loading branch information
joshrwolf committed Jan 23, 2024
1 parent 13cd12a commit 67d23f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions images/pulumi/tests/02-k8s-install-all-languages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}"
Expand Down
3 changes: 3 additions & 0 deletions images/pulumi/tests/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 67d23f2

Please sign in to comment.