mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 22:06:38 +08:00
18 lines
355 B
Go
18 lines
355 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()
|
|
}
|
|
}
|