Files
OwnCord/Server/api/main_test.go
T
jevb a24dbd5d55 feat: add syncutil mutex, test scaffolding, and server hardening
- Add syncutil package with deadlock-detecting mutex (build-tag switchable)
- Add main_test.go TestMain scaffolding across all server packages
- Harden concurrency in ws, admin, auth, and updater packages
- Update CI workflow, go.mod/sum, Cargo.lock, and root changelogen tooling
2026-04-01 12:04:15 +02:00

17 lines
417 B
Go

package api_test
import (
"testing"
"go.uber.org/goleak"
)
func TestMain(m *testing.M) {
goleak.VerifyTestMain(m,
// Hub.Run starts long-lived goroutines that are stopped via Hub.Stop().
// API tests create routers (which start hubs) but don't always call
// Stop() — these are expected background goroutines, not leaks.
goleak.IgnoreTopFunction("github.com/owncord/server/ws.(*Hub).Run.func1"),
)
}