Open samarth-gupta-traceable opened 4 years ago
hey @samarth-gupta-traceable can you please tell us the version of KUTTL you are using and also the directory structure as the error shouldn't be a panic.
And also for your case you want to assert
containerStatuses
which is an array with
conditions:
status: "True"
type: Ready
which isn't an array. Same for the containerStatuses
we have an issue open for array support https://github.com/kudobuilder/kuttl/issues/76
@zmalik
KUTTL version: 0.5.0
Dir structure:
kuttl-test.yaml
kuttl-test
- service-bootstrap
- 00-assert.yaml
- 01-cleanup.yaml
also, meanwhile is there a workaround to assert on array
, or is there a way to assert of liveness
or Readiness
probe events by kubenertes ?
thanks
@samarth-gupta-traceable here is one example https://github.com/kudobuilder/kuttl/blob/main/pkg/test/test_data/crd-in-step/00-assert.yaml the order matter in this case
yeah @samarth-gupta-traceable great comment regarding the use of "successful" in a phase in our docs :(. that is no good. I'll fix that today
repeated from slack so it isn't lost
@samarth thank you for report on this... there are a number of issues:
I will be review this more closely today... but it seems like you are in good hands with Zain actions:
I think i'm also hitting the same segfault issue, i've created #154 with my scenario.
I am trying below:
TestSuite
in filekuttl-test.yaml
2.assert if the pod started successfully as part of helm install, via 00-assert.yaml which is inside a test dir. Success criteria is: (1. Pod in Running state, 2. Pod should have zero restarts, 3. Ready probe should be true)I am having trouble with step 2 i.e. assert: I have tried both below as content of assert.yaml but both of them result in test fail, when actually Pod has come up and in Running state.
below 2 config fails
below passes
below is the error I get in failures
below is the kubectl get pod output
Another doubt I had was in the examples i see pod phase mentioned as Successful: https://kuttl.dev/docs/testing/asserts-errors.html#format
however valid phases mentioned as pod lifecycle are:
Pending , Running , Succeeded, Failed
here: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase