Skip to content

Commit

Permalink
check env vars with jsonpath
Browse files Browse the repository at this point in the history
  • Loading branch information
adwk67 committed Oct 31, 2023
1 parent 80c322a commit a58a1e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 0 additions & 3 deletions tests/templates/kuttl/resources/10-assert.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,3 @@ spec:
requests:
cpu: "2"
memory: 1Gi
env:
- name: SPARK_EXECUTOR_CORES
value: "2"
3 changes: 0 additions & 3 deletions tests/templates/kuttl/resources/12-assert.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,3 @@ spec:
requests:
cpu: "1"
memory: "2867Mi"
env:
- name: SPARK_EXECUTOR_CORES
value: "2"
7 changes: 7 additions & 0 deletions tests/templates/kuttl/resources/20-assert.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 120
commands:
- script: kubectl get pods -n $NAMESPACE resources-crd-exec-1 -o jsonpath='{.spec.containers[]}' | jq '.env[] | select(.name == "SPARK_EXECUTOR_CORES")'.value | grep "2"
- script: kubectl get pods -n $NAMESPACE resources-sparkconf-exec-1 -o jsonpath='{.spec.containers[]}' | jq '.env[] | select(.name == "SPARK_EXECUTOR_CORES")'.value | grep "2"

0 comments on commit a58a1e2

Please sign in to comment.