1
0
Fork 0
golang-forgejo-f3-gof3/internal/hoverfly/main_test.go

24 lines
426 B
Go
Raw Normal View History

// Copyright Earl Warren <contact@earl-warren.org>
// Copyright Loïc Dachary <loic@dachary.org>
// Copyright twenty-panda <twenty-panda@posteo.com>
// SPDX-License-Identifier: MIT
package hoverfly
import (
"os"
"testing"
)
func TestMain(m *testing.M) {
if val, ok := os.LookupEnv("HOVERFLY"); ok {
defer func() {
os.Setenv("HOVERFLY", val)
}()
}
code := m.Run()
exit = os.Exit
getwd = os.Getwd
exit(code)
}