Skip to content

Commit 161eee9

Browse files
committed
test.sh: use --fail-with-body rather than -f to see the err body
1 parent d258aca commit 161eee9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

hack/e2e/test.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ subject="system:serviceaccount:venafi:venafi-components"
133133
audience="https://${VEN_API_HOST}"
134134
issuerURL="$(kubectl create token -n venafi venafi-components | step crypto jwt inspect --insecure | jq -r '.payload.iss')"
135135
openidDiscoveryURL="${issuerURL}/.well-known/openid-configuration"
136-
jwksURI=$(curl -fsSL ${openidDiscoveryURL} | jq -r '.jwks_uri')
136+
jwksURI=$(curl --fail-with-body -sSL ${openidDiscoveryURL} | jq -r '.jwks_uri')
137137

138138
# Create the Venafi agent service account if one does not already exist
139139
while true; do
140-
tenantID=$(curl -fsSL -H "tppl-api-key: $VEN_API_KEY" https://${VEN_API_HOST}/v1/serviceaccounts \
140+
tenantID=$(curl --fail-with-body -sSL -H "tppl-api-key: $VEN_API_KEY" https://${VEN_API_HOST}/v1/serviceaccounts \
141141
| jq -r '.[] | select(.issuerURL==$issuerURL and .subject == $subject) | .companyId' \
142142
--arg issuerURL "${issuerURL}" \
143143
--arg subject "${subject}")
@@ -163,11 +163,12 @@ while true; do
163163
--arg audience "${audience}" \
164164
--arg issuerURL "${issuerURL}" \
165165
--arg jwksURI "${jwksURI}" \
166-
--argjson teams "$(curl https://${VEN_API_HOST}/v1/teams -fsSL -H tppl-api-key:\ ${VEN_API_KEY})" \
167-
--argjson applications "$(curl https://${VEN_API_HOST}/outagedetection/v1/applications -fsSL -H tppl-api-key:\ ${VEN_API_KEY})" \
166+
--argjson teams "$(curl https://${VEN_API_HOST}/v1/teams --fail-with-body -sSL -H tppl-api-key:\ ${VEN_API_KEY})" \
167+
--argjson applications "$(curl https://${VEN_API_HOST}/outagedetection/v1/applications --fail-with-body -sSL -H tppl-api-key:\ ${VEN_API_KEY})" \
168168
| curl https://${VEN_API_HOST}/v1/serviceaccounts \
169169
-H "tppl-api-key: $VEN_API_KEY" \
170-
-fsSL --json @-
170+
--fail-with-body \
171+
-sSL --json @-
171172
done
172173

173174
kubectl apply -n venafi -f - <<EOF

0 commit comments

Comments
 (0)