From f1d5975be7b957e640e59f9ce02289b44cfb0a5a Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Tue, 31 Oct 2023 17:32:56 +0100 Subject: [PATCH] replace jq usage with yq --- tests/templates/kuttl/resources/20-assert.yaml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/templates/kuttl/resources/20-assert.yaml.j2 b/tests/templates/kuttl/resources/20-assert.yaml.j2 index adcfac2a..2fba864f 100644 --- a/tests/templates/kuttl/resources/20-assert.yaml.j2 +++ b/tests/templates/kuttl/resources/20-assert.yaml.j2 @@ -3,5 +3,5 @@ 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" + - script: kubectl get pods -n $NAMESPACE resources-crd-exec-1 -o yaml | yq '.spec.containers[].env[] | select(.name == "SPARK_EXECUTOR_CORES").value' | grep -w "2" + - script: kubectl get pods -n $NAMESPACE resources-sparkconf-exec-1 -o yaml | yq '.spec.containers[].env[] | select(.name == "SPARK_EXECUTOR_CORES").value' | grep -w "2"