github.com/rumpl/bof@v23.0.0-rc.2+incompatible/integration/container/main_test.go (about) 1 package container // import "github.com/docker/docker/integration/container" 2 3 import ( 4 "fmt" 5 "os" 6 "testing" 7 8 "github.com/docker/docker/testutil/environment" 9 ) 10 11 var testEnv *environment.Execution 12 13 func TestMain(m *testing.M) { 14 var err error 15 testEnv, err = environment.New() 16 if err != nil { 17 fmt.Println(err) 18 os.Exit(1) 19 } 20 err = environment.EnsureFrozenImagesLinux(testEnv) 21 if err != nil { 22 fmt.Println(err) 23 os.Exit(1) 24 } 25 26 testEnv.Print() 27 os.Exit(m.Run()) 28 } 29 30 func setupTest(t *testing.T) func() { 31 environment.ProtectAll(t, testEnv) 32 return func() { testEnv.Clean(t) } 33 }