mirror of
https://github.com/outbackdingo/qdrant-helm.git
synced 2026-01-27 18:20:15 +00:00
21 lines
973 B
Bash
21 lines
973 B
Bash
setup_file() {
|
|
helm upgrade --install qdrant charts/qdrant --set apiKey=foobar -n qdrant-helm-integration --wait
|
|
kubectl rollout status statefulset qdrant -n qdrant-helm-integration
|
|
}
|
|
|
|
@test "api key authentication works" {
|
|
run kubectl exec -n default curl -- curl -s http://qdrant.qdrant-helm-integration:6333/collections -H 'api-key: foobar' --fail-with-body
|
|
[ $status -eq 0 ]
|
|
[[ "${output}" =~ .*\"status\":\"ok\".* ]]
|
|
}
|
|
|
|
@test "api key authentication fails with no key" {
|
|
run kubectl exec -n default curl -- curl -s -w " - %{response_code}" http://qdrant.qdrant-helm-integration:6333/collections
|
|
[ "${output}" = "Must provide an API key or an Authorization bearer token - 401" ]
|
|
}
|
|
|
|
@test "api key authentication fails with wrong key" {
|
|
run kubectl exec -n default curl -- curl -s -w " - %{response_code}" http://qdrant.qdrant-helm-integration:6333/collections -H 'api-key: invalid'
|
|
[ "${output}" = "Invalid API key or JWT - 401" ]
|
|
}
|