Specified test namespace not created when running TestSuite
Jaybee18 opened this issue · 0 comments
Jaybee18 commented
What happened:
The tests in a TestSuite fail, because the specified namespace does not exist.
What you expected to happen:
The TestSuite should create the namespace that is specified in the YAML, as it is described in the documentation:
https://kuttl.dev/docs/testing/reference.html#testsuite:~:text=%22kuttl%2Dtest%22-,namespace,-string
How to reproduce it (as minimally and precisely as possible):
# kuttl-test.yaml
apiVersion: kuttl.dev/v1beta1
kind: TestSuite
testDirs:
- ./mongodb
parallel: 1
namespace: "kuttl-tests-namespace"
# mongodb/01-install.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: demo
data:
# property-like keys; each key maps to a simple value
player_initial_lives: "3"
ui_properties_file_name: "user-interface.properties"
# file-like keys
game.properties: |
enemy.types=aliens,monsters
player.maximum-lives=5
user-interface.properties: |
color.good=purple
color.bad=yellow
allow.textmode=true
And then run
kubectl kuttl test .
Anything else we need to know?:
The logs indicate that the namespace creation was purposefully skipped:
logger.go:42: 09:30:26 | mongodb | Skipping creation of user-supplied namespace: kuttl-tests-namespace
Environment:
- Kubernetes version (use
kubectl version
): v1.27.11-eks-b9c9ed7 - KUTTL version (use
kubectl kuttl version
):
KUTTL Version: version.Info{GitVersion:"0.15.0", GitCommit:"f6d64c9", BuildDate:"2023-01-03T21:32:35Z", GoVersion:"go1.19.4", Compiler:"gc", Platform:"darwin/arm64"} - Cloud provider or hardware configuration:
- OS (e.g. from /etc/os-release):
- Kernel (e.g.
uname -a
): - Install tools:
- Others: