File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ publish: docker-publish helm-publish
152
152
153
153
run-dev :
154
154
kubectl apply -f deploy/stackable-operators-ns.yaml
155
- nix run -f. tilt -- up --port 5443 --namespace stackable-operators
155
+ nix run -f. tilt -- up --port 5430 --namespace stackable-operators
156
156
157
157
stop-dev :
158
158
nix run -f. tilt -- down
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ BEKU_TEST_SUITE=""
33
33
KUTTL_TEST=" "
34
34
KUTTL_SKIP_DELETE=" "
35
35
KUTTL_PARALLEL=" "
36
+ KUTTL_NAMESPACE=" "
36
37
37
38
is_installed () {
38
39
local command=" $1 "
@@ -79,6 +80,15 @@ run_tests() {
79
80
OPTS+=(" --skip-delete" )
80
81
fi
81
82
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
+
82
92
if [ -n " $KUTTL_PARALLEL " ]; then
83
93
OPTS+=(" --parallel $KUTTL_PARALLEL " )
84
94
fi
@@ -105,6 +115,7 @@ usage() {
105
115
--skip-delete Skip resource deletion after the test run.
106
116
--parallel <number> Run tests in parallel. Default is to run all tests in parallel.
107
117
--skip-release Skip the operator installation.
118
+ --namespace <namespace> Run the tests in the specified namespace.
108
119
USAGE
109
120
}
110
121
@@ -129,6 +140,10 @@ parse_args() {
129
140
KUTTL_TEST=" $2 "
130
141
shift
131
142
;;
143
+ --namespace)
144
+ KUTTL_NAMESPACE=" $2 "
145
+ shift
146
+ ;;
132
147
* )
133
148
echo " Unknown parameter : $1 "
134
149
usage
You can’t perform that action at this time.
0 commit comments