bastion 0.53.2
ci / personal-data (push) Successful in 5s
ci / test (push) Successful in 3m4s
ci / fuzz (push) Successful in 3m45s

This commit is contained in:
Privatae
2026-10-20 04:42:14 +00:00
commit e4c9b69b46
471 changed files with 159794 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
//go:build !windows
package main
import "testing"
// Off Windows the guard must stay a no-op, because acquireSingletonLock already
// holds the machine-wide lock there with DIFFERENT semantics — the loser becomes
// a standby that waits for the primary to die, which is what systemd wants.
// Making this refuse instead would turn every standby into a crash.
func TestRunGuardIsANoOpOffWindows(t *testing.T) {
if err := guardSingleRun(); err != nil {
t.Fatalf("guardSingleRun must not refuse off Windows: %v", err)
}
// And twice, because a standby calls it too.
if err := guardSingleRun(); err != nil {
t.Fatalf("a second call must also pass off Windows: %v", err)
}
}