Files
OpenFlare/internal/testhelper/cleanup.go
T
ryan 9550fa6ff3 perf(cap): add runtime settings snapshot for dynamic config
Replace per-request GetByKey calls with a singleflight-backed
RuntimeSettings snapshot loaded via ListSystemConfigsByKeys.
Invalidate snapshot on admin cap_* writes and via Redis pub/sub.
Simplify VerifyMiddleware and update PERFORMANCE.md status.
2026-06-17 12:07:02 +08:00

17 lines
354 B
Go

// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
package testhelper
// RegisterCleanup registers an extra cleanup hook invoked by SetupTestEnvironment.
func RegisterCleanup(fn func()) {
extraCleanups = append(extraCleanups, fn)
}
var extraCleanups []func()
func runExtraCleanups() {
for _, fn := range extraCleanups {
fn()
}
}