24 lines
426 B
Go
24 lines
426 B
Go
|
// 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)
|
||
|
}
|