test: add git helper and guard annotations

This commit is contained in:
Jordan Hubbard
2025-12-28 21:44:35 -04:00
committed by Steve Yegge
parent f3dcafca66
commit 713c569e6e
10 changed files with 492 additions and 507 deletions

View File

@@ -0,0 +1,17 @@
package main
import (
"os"
"testing"
)
// requireTestGuardDisabled skips destructive integration tests unless the
// BEADS_TEST_GUARD_DISABLE flag is set, mirroring the behavior enforced by the
// guard when running the full suite.
func requireTestGuardDisabled(t *testing.T) {
t.Helper()
if os.Getenv("BEADS_TEST_GUARD_DISABLE") != "" {
return
}
t.Skip("set BEADS_TEST_GUARD_DISABLE=1 to run this integration test")
}