Skip to content

Commit

Permalink
Add retries to curl container
Browse files Browse the repository at this point in the history
  • Loading branch information
mac-chaffee committed May 3, 2024
1 parent 64cac46 commit d4bb7a9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions charts/qdrant/templates/tests/test-db-interaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ data:
QDRANT_COLLECTION="test_collection"
{{- range .Values.service.ports }}
{{- if eq .name "http" }}
echo "Connecting to {{ include "qdrant.fullname" $root }}:{{ .port }}"
QDRANT_URL="http://{{ include "qdrant.fullname" $root }}:{{ .port }}"
echo "Connecting to {{ include "qdrant.fullname" $root }}.{{ $namespace }}:{{ .port }}"
QDRANT_URL="http://{{ include "qdrant.fullname" $root }}.{{ $namespace }}:{{ .port }}"
{{- if and $root.Values.config.service $root.Values.config.service.enable_tls }}
echo "Using https"
QDRANT_URL="https://{{ include "qdrant.fullname" $root }}:{{ .port }}"
QDRANT_URL="https://{{ include "qdrant.fullname" $root }}.{{ $namespace }}:{{ .port }}"
{{- end }}
{{- end }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion test/integration/https.bats
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ setup_file() {
@test "helm test - with https" {
run helm test qdrant -n qdrant-helm-integration --logs
[ $status -eq 0 ]
}
}
6 changes: 5 additions & 1 deletion test/integration/setup_suite.bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
setup_suite() {
kind create cluster -n qdrant-helm-integration
kubectl create serviceaccount default -n default
kubectl -n default run curl --image=docker.io/curlimages/curl --command -- sh -c "sleep 3600"
kubectl -n default run curl --image=docker.io/curlimages/curl --command -- sh -c ' echo "connect-timeout = 5" > $HOME/.curlrc;
echo "retry = 60" >> $HOME/.curlrc;
echo "retry-delay = 5" >> $HOME/.curlrc;
echo "retry-all-errors" >> $HOME/.curlrc;
sleep 3600'
kubectl wait --for=condition=Ready pod/curl -n default --timeout=300s
kubectl create namespace qdrant-helm-integration
kubectl create serviceaccount default -n qdrant-helm-integration || true
Expand Down

0 comments on commit d4bb7a9

Please sign in to comment.