github.com/lacework-dev/go-moby@v20.10.12+incompatible/integration/plugin/graphdriver/main_test.go (about)

     1  package graphdriver // import "github.com/docker/docker/integration/plugin/graphdriver"
     2  
     3  import (
     4  	"fmt"
     5  	"os"
     6  	"testing"
     7  
     8  	"github.com/docker/docker/pkg/reexec"
     9  	"github.com/docker/docker/testutil/environment"
    10  )
    11  
    12  var (
    13  	testEnv *environment.Execution
    14  )
    15  
    16  func init() {
    17  	reexec.Init() // This is required for external graphdriver tests
    18  }
    19  
    20  func TestMain(m *testing.M) {
    21  	var err error
    22  	testEnv, err = environment.New()
    23  	if err != nil {
    24  		fmt.Println(err)
    25  		os.Exit(1)
    26  	}
    27  	err = environment.EnsureFrozenImagesLinux(testEnv)
    28  	if err != nil {
    29  		fmt.Println(err)
    30  		os.Exit(1)
    31  	}
    32  	testEnv.Print()
    33  	os.Exit(m.Run())
    34  }