poll to ensure securityconfig is applied

This commit is contained in:
phact 2025-10-07 13:49:06 -04:00
parent 6a68a46ef3
commit d0fb8af3c8

View file

@ -211,9 +211,18 @@ test-ci:
for i in $$(seq 1 60); do \
curl -s http://localhost:8000/.well-known/openid-configuration >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "Waiting for OpenSearch..."; \
echo "Waiting for OpenSearch with JWT auth to work..."; \
for i in $$(seq 1 60); do \
curl -k -s https://localhost:9200 -u admin:$${OPENSEARCH_PASSWORD} >/dev/null 2>&1 && break || sleep 2; \
if curl -k -s https://localhost:9200 -u admin:$${OPENSEARCH_PASSWORD} >/dev/null 2>&1; then \
TOKEN=$$(curl -s http://localhost:8000/auth/me | grep -o '"token":"[^"]*"' | cut -d'"' -f4 || echo ""); \
if [ -n "$$TOKEN" ]; then \
if curl -k -s -H "Authorization: Bearer $$TOKEN" https://localhost:9200/documents/_search -d '{"query":{"match_all":{}}}' 2>&1 | grep -v "Unauthorized" >/dev/null; then \
echo "OpenSearch JWT auth working"; \
break; \
fi; \
fi; \
fi; \
sleep 2; \
done; \
echo "Waiting for Langflow..."; \
for i in $$(seq 1 60); do \