Shadow database demotion checks from native path

This commit is contained in:
Lyncoln
2026-09-17 18:27:46 -04:00
parent a63b63bb5b
commit 6f1f8814f2
4 changed files with 72 additions and 2 deletions
+1
View File
@@ -26,6 +26,7 @@ python3 ./tests/test-proxy-client-actions.py
python3 ./tests/test-proxy-client-parameters.py
./tests/test-notify-daemon-shadow.sh
./tests/test-notify-target-shadow.sh
./tests/test-demote-database-shadow.sh
echo
echo ">>> Python syntax"
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
FILE="$ROOT/ocf/loxthelion/managed-container.d/applications/postgresql/native_peers.sh"
grep -q '^mc_pg_demote_database_shadow()' "$FILE"
grep -q '"demote.database"' "$FILE"
grep -q 'final_handoff_required' "$FILE"
grep -q 'comparison=MATCH' "$FILE"
grep -q 'demote.database shadow MISMATCH' "$FILE"
echo "DEMOTE_DATABASE_SHADOW_TEST_PASS=1"