Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test(minikube): make recovery mode assertion portable

Alfredo Lopezaaf415ebfa03
diff --git a/scripts/tests/test-minikube-writer-recovery-state.sh b/scripts/tests/test-minikube-writer-recovery-state.sh
index 73f3c9765..ab75c45a4 100755
--- a/scripts/tests/test-minikube-writer-recovery-state.sh
+++ b/scripts/tests/test-minikube-writer-recovery-state.sh
@@ -28,7 +28,11 @@ identity=(
)
python3 "$HELPER" write "${identity[@]}" --phase planned --hcc 1 --workflow 1 --trace 1 --control-api 1
-mode="$(stat -f '%Lp' "$STATE" 2>/dev/null || stat -c '%a' "$STATE")"
+if stat -c '%a' "$STATE" >/dev/null 2>&1; then
+ mode="$(stat -c '%a' "$STATE")"
+else
+ mode="$(stat -f '%Lp' "$STATE")"
+fi
[[ "$mode" == 600 ]] || fail "state mode is $mode, expected 600"
python3 "$HELPER" read "${identity[@]}" | grep -Fxq 'planned|1|1|1|1' ||
fail 'planned state did not round-trip with exact replicas'