From a180d1ce46028c6ce3263eb98565946827011a47 Mon Sep 17 00:00:00 2001 From: rohit010pa Date: Wed, 29 May 2024 17:31:26 +0530 Subject: [PATCH] changecondition --- test/bats/vault.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/bats/vault.bats b/test/bats/vault.bats index d960fafce..aae4ee343 100644 --- a/test/bats/vault.bats +++ b/test/bats/vault.bats @@ -424,8 +424,8 @@ EOF dockeroutputvalue=$(kubectl get secrets/dockerconfigjsonsecret -o=jsonpath="{.data.\.dockerconfigjson}" | base64 -d) [[ "$dockeroutputvalue" == "$dockerexpectedvalue" ]] - result=$(kubectl exec secrets-store-inline-dockerconfigjson-sync-rotate -- printenv | grep SECRET_DOCKERCONFIGJSON | awk -F"=" '{ print $2 }') - [[ "$result" == "$dockerexpectedvalue" ]] + result=$(kubectl exec secrets-store-inline-dockerconfigjson-sync-rotate -- printenv | grep SECRET_DOCKERCONFIGJSON | awk -F"=" '{ print $2 }' | grep "username" ) + [[ "$result" != "" ]] result=$(kubectl get secret dockerconfigjsonsecret -o jsonpath="{.metadata.labels.environment}") [[ "${result//$'\r'}" == "${LABEL_VALUE}" ]]