Skip to content

Commit

Permalink
Fix broken Makefile scripting for yq
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPansino committed Jan 28, 2025
1 parent a124666 commit 0a2c555
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ test: build-initcontainer build-testapp check-language-arg
@sleep 5
@kubectl wait --for=condition=Ready -n default --all pods
# If yq is installed, check for the initcontainer to be visible on the pod spec
@which -s yq && \
echo "===== Ensuring initcontainer was successfully attached by operator. ====="; \
kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" \
&& echo "===== Initcontainer successfully attached. =====" \
|| { echo -e "===== Operator failed to attach initcontainer. =====" >&2; exit 1; }
@echo "===== Ensuring initcontainer was successfully attached by operator. =====" && \
which -s yq && { \
kubectl get pods --output yaml | yq '.items[].spec.initContainers[].name' | grep -q "newrelic-instrumentation-" \
&& echo "===== Initcontainer successfully attached. =====" \
|| { echo -e "===== Operator failed to attach initcontainer. =====" >&2; exit 1; } } \
|| echo "yq is not installed. Skipping."
@echo "===== Opening tunnel to test app and opening web browser. ====="
@minikube service test-app-${INITCONTAINER_LANGUAGE}-service -n default

Expand Down

0 comments on commit 0a2c555

Please sign in to comment.