Skip to content

Commit 9119a34

Browse files
committed
factor out ctnrdebug test
1 parent f4df65e commit 9119a34

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

tests/templates/kuttl/smoke/10-assert.yaml.j2

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,3 @@ spec:
3232
- name: vector
3333
{% endif %}
3434
terminationGracePeriodSeconds: 125 # 2 minutes + 5s safety buffer
35-
---
36-
# This test checks if the containerdebug-state.json file is present and valid
37-
apiVersion: kuttl.dev/v1beta1
38-
kind: TestAssert
39-
timeout: 600
40-
commands:
41-
- script: |
42-
FIRST_OPA_POD=$(kubectl get -n $NAMESPACE pods --field-selector=status.phase=Running --selector app.kubernetes.io/instance=test-opa -o jsonpath='{.items[0].metadata.name}')
43-
kubectl exec -n $NAMESPACE --container opa $FIRST_OPA_POD -- cat /stackable/log/containerdebug-state.json | jq --exit-status
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
# This test checks if the containerdebug-state.json file is present and valid
3+
apiVersion: kuttl.dev/v1beta1
4+
kind: TestAssert
5+
timeout: 600
6+
commands:
7+
- script: |
8+
FIRST_OPA_POD=$(kubectl get -n $NAMESPACE pods --field-selector=status.phase=Running --selector app.kubernetes.io/instance=test-opa -o jsonpath='{.items[0].metadata.name}')
9+
kubectl exec -n $NAMESPACE --container opa $FIRST_OPA_POD -- cat /stackable/log/containerdebug-state.json | jq --exit-status '"valid JSON"'

0 commit comments

Comments
 (0)