Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(e2e): enforce HCC gate ownership
Alfredo Lopez6808e117695d
diff --git a/Makefile b/Makefileindex 6921b4e98..81bffa444 100644--- a/Makefile+++ b/Makefile@@ -847,7 +847,8 @@ test-e2e-stateless-wake-recovery: ## Run stateless wake-recovery latency gate (R.PHONY: test-e2e-hcc-communicationchannel-watch-recoverytest-e2e-hcc-communicationchannel-watch-recovery: ## Run isolated minikube HCC watch-recovery fault-injection gate@echo "Running HCC CommunicationChannel watch-recovery gate..."- E2E_HCC_WATCH_FAULT_INJECTION=1 KUBECONTEXT=$(E2E_KUBECONTEXT) bash scripts/e2e/e2e-hcc-communicationchannel-watch-recovery.sh+ @test -n "$(E2E_EXPECTED_PRE_GATE_GATE)" || { echo "Set E2E_EXPECTED_PRE_GATE_GATE to the gate recorded by the branch-owned pre-gate sync" >&2; exit 1; }+ E2E_HCC_WATCH_FAULT_INJECTION=1 E2E_EXPECTED_PRE_GATE_GATE="$(E2E_EXPECTED_PRE_GATE_GATE)" MINIKUBE_PROFILE=$(E2E_KUBECONTEXT) KUBECONTEXT=$(E2E_KUBECONTEXT) bash scripts/e2e/e2e-hcc-communicationchannel-watch-recovery.sh.PHONY: test-e2e-hcc-readiness-bootstraptest-e2e-hcc-readiness-bootstrap: ## Prove HCC readiness while its initial Host fleet pass remains activediff --git a/scripts/tests/test-hcc-watch-recovery-gate.sh b/scripts/tests/test-hcc-watch-recovery-gate.shindex aac455ea2..7110a75d7 100755--- a/scripts/tests/test-hcc-watch-recovery-gate.sh+++ b/scripts/tests/test-hcc-watch-recovery-gate.sh@@ -11,6 +11,7 @@ GATES=("$WATCH_GATE" "$READINESS_GATE" "$MCP_READINESS_GATE")LOCK_HELPER="${SCRIPT_DIR}/_lib/hcc-watch-recovery-lock.sh"LOG_HELPER="${SCRIPT_DIR}/_lib/hcc-watch-recovery-logs.sh"FIXTURE_HELPER="${SCRIPT_DIR}/_lib/hcc-watch-recovery-fixture.sh"+WATCH_GATE_TARGET="$(sed -n '/^test-e2e-hcc-communicationchannel-watch-recovery:/,/^$/p' "${ROOT}/Makefile")"MOCK_STATE_FILE="$(mktemp "${TMPDIR:-/tmp}/hcc-lock-test.XXXXXX")"MOCK_LOG_FILE="$(mktemp "${TMPDIR:-/tmp}/hcc-log-test.XXXXXX")"MOCK_PROFILE_ROOT="$(mktemp -d "${TMPDIR:-/tmp}/hcc-profile-test.XXXXXX")"@@ -30,6 +31,13 @@ done# Literal source-code assertions.# shellcheck disable=SC2016+if [[ "$WATCH_GATE_TARGET" == *'E2E_EXPECTED_PRE_GATE_GATE="$(E2E_EXPECTED_PRE_GATE_GATE)"'* ]] &&+ [[ "$WATCH_GATE_TARGET" == *'MINIKUBE_PROFILE=$(E2E_KUBECONTEXT)'* ]]; then+ pass "CommunicationChannel gate target propagates exact pre-gate and profile ownership"+else+ fail "CommunicationChannel gate target omits exact pre-gate or profile ownership"+fi+if grep -Fq 'source "${SCRIPT_DIR}/_lib/hcc-watch-recovery-fixture.sh"' "$READINESS_GATE" &&[ "$(grep -Fc 'require_branch_owned_hcc_gate "$HCC_NS"' "$READINESS_GATE")" = 1 ] &&! grep -Fq 'HCC_BRANCH_GATE_SYNC_MARKER' "$READINESS_GATE" &&