poll to ensure securityconfig is applied
This commit is contained in:
parent
6a68a46ef3
commit
d0fb8af3c8
1 changed files with 11 additions and 2 deletions
13
Makefile
13
Makefile
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue