-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TestAssert is assumed to be a CRD in the cluster #462
Comments
This is not a bug. Maybe it should be explained in a better way in the documentation. When you use a filename apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 5
collectors:
- type: command
command: echo hello KUTTL will try to look for a Since what you want is KUTTL to "execute" that file, you need to rename your file from |
Thanks for responding @iblancasa The documentation, quoted below (emphasis mine), would imply it should be in the
From searching GitHub for examples of usage, I see that I unfortunately continue to receive the error message for every combination I've tried. I'll continue trying different combinations and report back if I find success. |
Sorry. I misunderstood something from the first message. I tried the file you provided and it works for me: $ kuttl test check
2023/03/03 10:23:44 kutt-test config testdirs is overridden with args: [ check ]
=== RUN kuttl
harness.go:462: starting setup
harness.go:252: running tests using configured kubeconfig.
harness.go:275: Successful connection to cluster at: https://127.0.0.1:37213
harness.go:360: running tests
harness.go:73: going to run test suite with timeout of 30 seconds for each step
harness.go:372: testsuite: check has 1 tests
=== RUN kuttl/harness
=== RUN kuttl/harness/mytest
=== PAUSE kuttl/harness/mytest
=== CONT kuttl/harness/mytest
logger.go:42: 10:23:44 | mytest | Creating namespace: kuttl-test-resolved-boa
logger.go:42: 10:23:44 | mytest/1- | starting test step 1-
logger.go:42: 10:23:44 | mytest/1- | test step completed 1-
logger.go:42: 10:23:44 | mytest | mytest events from ns kuttl-test-resolved-boa:
logger.go:42: 10:23:44 | mytest | Deleting namespace: kuttl-test-resolved-boa
=== CONT kuttl
harness.go:405: run tests finished
harness.go:513: cleaning up
harness.go:570: removing temp folder: ""
--- PASS: kuttl (5.15s)
--- PASS: kuttl/harness (0.00s)
--- PASS: kuttl/harness/mytest (5.12s)
PASS
$ 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:"linux/amd64"}
$ kubectl version --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.26.1
Kustomize Version: v4.5.7
Server Version: v1.25.3
|
@iblancasa I'm running into the exact same problem. You are executing And by default, kuttl.dev's CRDs are not installed into a Kubernetes cluster under test. I think that there should be a Helm chart that installs these kuttl.dev CRDs along with the kuttl krew plugin otherwise users are not able to use the TestStep/TestAssert/TestSuite CRs. |
I tried to reproduce this, unsuccessfully:
This cluster definitely does not have the kuttl CRDs installed. This should not be necessary. FTR, kuttl is supposed to filter out the I suspect something is broken in the way kuttl loads objects from the yaml file. |
No. I'm using a newly created kind cluster. Without installing anything.
As I pointed out, it is not needed. Can you provide a reproducer for your problem? |
What happened:
This is possibly a bug, or possibly my complete misunderstanding of how TestAssert is meant to work!
I have a
TestAssert
definition in01-assert.yaml
file:kuttl reports the following:
What you expected to happen:
TestAssert is recognised by kuttl and has the behaviour described in the documentation.
How to reproduce it (as minimally and precisely as possible):
See above specification and below environment details.
Anything else we need to know?:
Environment:
kubectl version
):kubectl kuttl version
):uname -a
):The text was updated successfully, but these errors were encountered: