diff --git a/tests/integration/kubernetes/k8s-credentials-secrets.bats b/tests/integration/kubernetes/k8s-credentials-secrets.bats index 7035c70fb9..dcc52093e8 100644 --- a/tests/integration/kubernetes/k8s-credentials-secrets.bats +++ b/tests/integration/kubernetes/k8s-credentials-secrets.bats @@ -55,8 +55,8 @@ setup() { kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name" # List the files - kubectl exec $pod_name -- "${pod_exec_command[@]}" | grep -w "password" - kubectl exec $pod_name -- "${pod_exec_command[@]}" | grep -w "username" + pod_exec_with_retries "${pod_name}" "${pod_exec_command[@]}" | grep -w "password" + pod_exec_with_retries "${pod_name}" "${pod_exec_command[@]}" | grep -w "username" # Create a pod that has access to the secret data through environment variables kubectl create -f "${pod_env_yaml_file}" @@ -65,8 +65,8 @@ setup() { kubectl wait --for=condition=Ready --timeout=$timeout pod "$second_pod_name" # Display environment variables - kubectl exec $second_pod_name -- "${pod_env_exec_command[@]}" | grep -w "SECRET_USERNAME" - kubectl exec $second_pod_name -- "${pod_env_exec_command[@]}" | grep -w "SECRET_PASSWORD" + pod_exec_with_retries "${second_pod_name}" "${pod_env_exec_command[@]}" | grep -w "SECRET_USERNAME" + pod_exec_with_retries "${second_pod_name}" "${pod_env_exec_command[@]}" | grep -w "SECRET_PASSWORD" } teardown() {