Skip to content

Commit 5bfddca

Browse files
Generated commit to update templated files based on rev 1ce22e8 in stackabletech/operator-templating repo. (#67)
Triggered by: Manual run triggered by: razvan with message [run_tests.sh support --namespace]
1 parent 1801790 commit 5bfddca

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

Diff for: Cargo.nix

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ publish: docker-publish helm-publish
152152

153153
run-dev:
154154
kubectl apply -f deploy/stackable-operators-ns.yaml
155-
nix run -f. tilt -- up --port 5434 --namespace stackable-operators
155+
nix run -f. tilt -- up --port 5430 --namespace stackable-operators
156156

157157
stop-dev:
158158
nix run -f. tilt -- down

Diff for: crate-hashes.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: scripts/run_tests.sh

+15
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ BEKU_TEST_SUITE=""
3333
KUTTL_TEST=""
3434
KUTTL_SKIP_DELETE=""
3535
KUTTL_PARALLEL=""
36+
KUTTL_NAMESPACE=""
3637

3738
is_installed() {
3839
local command="$1"
@@ -79,6 +80,15 @@ run_tests() {
7980
OPTS+=("--skip-delete")
8081
fi
8182

83+
if [ -n "$KUTTL_NAMESPACE" ]; then
84+
OPTS+=("--namespace $KUTTL_NAMESPACE")
85+
86+
# Create the namespace if it does not exist.
87+
# To avoid an error when the namespace already exists, we use "kubectl describe"
88+
# and if that fails we create the namespace.
89+
kubectl describe namespace "$KUTTL_NAMESPACE" || kubectl create namespace "$KUTTL_NAMESPACE"
90+
fi
91+
8292
if [ -n "$KUTTL_PARALLEL" ]; then
8393
OPTS+=("--parallel $KUTTL_PARALLEL")
8494
fi
@@ -105,6 +115,7 @@ usage() {
105115
--skip-delete Skip resource deletion after the test run.
106116
--parallel <number> Run tests in parallel. Default is to run all tests in parallel.
107117
--skip-release Skip the operator installation.
118+
--namespace <namespace> Run the tests in the specified namespace.
108119
USAGE
109120
}
110121

@@ -129,6 +140,10 @@ parse_args() {
129140
KUTTL_TEST="$2"
130141
shift
131142
;;
143+
--namespace)
144+
KUTTL_NAMESPACE="$2"
145+
shift
146+
;;
132147
*)
133148
echo "Unknown parameter : $1"
134149
usage

0 commit comments

Comments
 (0)