Switch tests to curl (#178)

Co-authored-by: Marco Franssen <[email protected]>
Signed-off-by: Marco Franssen <[email protected]>
This commit is contained in:
kfox1111
2023-04-03 19:32:18 +02:00
committed by GitHub
co-authored by Marco Franssen
parent 1b4bfb779e
commit 072d952d9a
2 changed files with 27 additions and 15 deletions
@@ -11,10 +11,22 @@ spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 4 }}
containers:
- name: netcat
- name: curl
image: cgr.dev/chainguard/bash:latest
command: ['nc']
args: ['-zvw3', '{{ include "spire-server.fullname" . }}', '{{ .Values.service.port }}']
command: ['bash']
args:
- -c
- |
curl -f -s 'https://{{ include "spire-server.fullname" . }}:{{ .Values.service.port }}'
NOCA=$?
curl -k -f -s 'https://{{ include "spire-server.fullname" . }}:{{ .Values.service.port }}'
IGNORECA=$?
echo $NOCA $IGNORECA
if [ $NOCA -eq 60 -a $IGNORECA -eq 22 ]; then
# We were able to connect to the server but didn't recognize the ca (60) and the page not found (22) because we're not using grpc
exit 0
fi
exit 1
securityContext:
{{- toYaml .Values.securityContext | nindent 8 }}
{{- if eq (.Values.federation.enabled | toString) "true" }}