Skip to content

Commit

Permalink
Generated commit to update templated files based on rev 1ce22e8 in st…
Browse files Browse the repository at this point in the history
…ackabletech/operator-templating repo. (#371)

Triggered by:
Manual run triggered by: razvan with message [run_tests.sh support --namespace]
  • Loading branch information
stackable-bot committed Mar 5, 2024
1 parent 22c4902 commit bffc78d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ publish: docker-publish helm-publish

run-dev:
kubectl apply -f deploy/stackable-operators-ns.yaml
nix run -f. tilt -- up --port 5443 --namespace stackable-operators
nix run -f. tilt -- up --port 5430 --namespace stackable-operators

stop-dev:
nix run -f. tilt -- down
15 changes: 15 additions & 0 deletions scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ BEKU_TEST_SUITE=""
KUTTL_TEST=""
KUTTL_SKIP_DELETE=""
KUTTL_PARALLEL=""
KUTTL_NAMESPACE=""

is_installed() {
local command="$1"
Expand Down Expand Up @@ -79,6 +80,15 @@ run_tests() {
OPTS+=("--skip-delete")
fi

if [ -n "$KUTTL_NAMESPACE" ]; then
OPTS+=("--namespace $KUTTL_NAMESPACE")

# Create the namespace if it does not exist.
# To avoid an error when the namespace already exists, we use "kubectl describe"
# and if that fails we create the namespace.
kubectl describe namespace "$KUTTL_NAMESPACE" || kubectl create namespace "$KUTTL_NAMESPACE"
fi

if [ -n "$KUTTL_PARALLEL" ]; then
OPTS+=("--parallel $KUTTL_PARALLEL")
fi
Expand All @@ -105,6 +115,7 @@ usage() {
--skip-delete Skip resource deletion after the test run.
--parallel <number> Run tests in parallel. Default is to run all tests in parallel.
--skip-release Skip the operator installation.
--namespace <namespace> Run the tests in the specified namespace.
USAGE
}

Expand All @@ -129,6 +140,10 @@ parse_args() {
KUTTL_TEST="$2"
shift
;;
--namespace)
KUTTL_NAMESPACE="$2"
shift
;;
*)
echo "Unknown parameter : $1"
usage
Expand Down

0 comments on commit bffc78d

Please sign in to comment.