Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(minikube): exercise deadline and inventory failure paths
Alfredo Lopez222114b6191a
diff --git a/scripts/tests/test-minikube-build-images-hardening.sh b/scripts/tests/test-minikube-build-images-hardening.shindex 268ab6d4c..5adff2e65 100755--- a/scripts/tests/test-minikube-build-images-hardening.sh+++ b/scripts/tests/test-minikube-build-images-hardening.sh@@ -364,6 +364,22 @@ elsefail "a Minikube inventory failure was treated as an image miss (status=$inventory_failure_status)"fi+clear_runtime_state+mutation_inventory_failure_output="$TMP_DIR/mutation-inventory-failure.out"+mutation_inventory_failure_status=0+run_build "$mutation_inventory_failure_output" valid \+ MINIKUBE_PRELOAD_BASE_IMAGES=true \+ FAKE_MINIKUBE_INVENTORY_MODE=exit-1 \+ bash "$BUILD_SCRIPT" --only=control-api || mutation_inventory_failure_status=$?+if [[ "$mutation_inventory_failure_status" -eq 2 ]] \+ && grep -Fq 'Could not inspect' "$mutation_inventory_failure_output" \+ && ! grep -Fq 'image load' "$MINIKUBE_LOG" \+ && ! grep -Fq ' pull ' "$DOCKER_LOG"; then+ pass 'a failed Minikube inventory blocks mutation before pull or load'+else+ fail "a failed Minikube inventory reached image mutation (status=$mutation_inventory_failure_status)"+fi+descendant_is_dead() {local record descendant[[ -f "$DESCENDANT_PID_FILE" ]] || return 1diff --git a/scripts/tests/test-minikube-t2-scenarios.sh b/scripts/tests/test-minikube-t2-scenarios.shindex 0f5ff52d5..5a04c78b3 100755--- a/scripts/tests/test-minikube-t2-scenarios.sh+++ b/scripts/tests/test-minikube-t2-scenarios.sh@@ -134,6 +134,7 @@ case "$*" indoneprintf '%s' "${FAKE_CONTEXT:-}" ;;*"config view"*) printf '%s://%s:6443' https "${FAKE_ENDPOINT:-10.0.0.1}" ;;+ *"get configmap"*) printf '%s' "${FAKE_MARKER:-}" ;;*) exit 0 ;;esacEOF@@ -445,8 +446,9 @@ plan_mode_head="$(env "${marker_env[@]}" T2_PLAN_MODE=true FAKE_MARKER='{"data":marker_stderr="$tmp/marker-deadline.stderr"marker_fast_path_status=0marker_fast_path="$(env "${marker_env[@]}" T2_PLAN_MODE=false \+ PATH="$fake_bin:$PATH" \FAKE_MARKER='{"data":{"clusterFingerprint":"fp","gitHead":"feature","worktreeId":"worktree-a","imageSource":"local","imageTag":"test","imagesGeneratedAt":"generated"}}' \- bash -c 'source "$1"; T2_WORKTREE_ID=worktree-a; T2_HEAD=feature; T2_PLAN_MODE=false; t2_kc(){ printf "%s" "$FAKE_MARKER"; printf "%s\n" "[HARNESS_DEADLINE] label=t2-kubectl event=exit" >&2; }; t2_marker_check; printf "%s" "$T2_MARKER_MATCHES_HEAD"' bash "$COMMON" 2>"$marker_stderr")" || marker_fast_path_status=$?+ bash -c 'source "$1"; T2_WORKTREE_ID=worktree-a; T2_HEAD=feature; T2_PLAN_MODE=false; t2_marker_check; printf "%s" "$T2_MARKER_MATCHES_HEAD"' bash "$COMMON" 2>"$marker_stderr")" || marker_fast_path_status=$?if [ "$marker_fast_path_status" -ne 0 ] || [ "$marker_fast_path" != true ]; thenfail "stderr from the bounded marker read broke the valid-marker fast path (status=$marker_fast_path_status result=$marker_fast_path)"fi