Files
adguardhome-sync/testdata/e2e/bin/wait-for-sync.sh
T
Marc Brugger d6d8d2148d Implement metrics from adguard-exporter (#303)
* implement metrics
2024-03-12 19:48:29 +01:00

15 lines
367 B
Bash
Executable File

#!/bin/bash
kubectl wait --for=jsonpath='{.status.phase}'=Running pod/adguardhome-sync --timeout=1m
kubectl port-forward pod/adguardhome-sync 9090:9090 &
for i in {1..6}; do
sleep 10
RUNNING=$(curl http://localhost:9090/api/v1/status -s | jq -r .syncRunning)
echo "SyncRunning = ${RUNNING}"
if [[ "${RUNNING}" == "false" ]]; then
exit 0
fi
done