github.com/rita33cool1/iot-system-gateway@v0.0.0-20200911033302-e65bde238cc5/docker-engine/integration/plugin/volumes/main_test.go (about)

     1  package volumes // import "github.com/docker/docker/integration/plugin/volumes"
     2  
     3  import (
     4  	"fmt"
     5  	"os"
     6  	"testing"
     7  
     8  	"github.com/docker/docker/internal/test/environment"
     9  )
    10  
    11  var (
    12  	testEnv *environment.Execution
    13  )
    14  
    15  func TestMain(m *testing.M) {
    16  	var err error
    17  	testEnv, err = environment.New()
    18  	if err != nil {
    19  		fmt.Println(err)
    20  		os.Exit(1)
    21  	}
    22  	if testEnv.OSType != "linux" {
    23  		os.Exit(0)
    24  	}
    25  	err = environment.EnsureFrozenImagesLinux(testEnv)
    26  	if err != nil {
    27  		fmt.Println(err)
    28  		os.Exit(1)
    29  	}
    30  	testEnv.Print()
    31  	os.Exit(m.Run())
    32  }