github.com/jwhonce/docker@v0.6.7-0.20190327063223-da823cf3a5a3/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/internal/test/environment"
     9  	"github.com/docker/docker/pkg/reexec"
    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  const dockerdBinary = "dockerd"
    21  
    22  func TestMain(m *testing.M) {
    23  	var err error
    24  	testEnv, err = environment.New()
    25  	if err != nil {
    26  		fmt.Println(err)
    27  		os.Exit(1)
    28  	}
    29  	err = environment.EnsureFrozenImagesLinux(testEnv)
    30  	if err != nil {
    31  		fmt.Println(err)
    32  		os.Exit(1)
    33  	}
    34  	testEnv.Print()
    35  	os.Exit(m.Run())
    36  }