Files
docker-cli/components/engine/integration/service/main_test.go
Daniel Nephin 1057cf80e4 Replace service ps cli tests with service inspect API test.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6cd6d8646a90fa2013416bc8f11bd78d72c4180d
Component: engine
2017-08-25 17:27:41 -04:00

38 lines
702 B
Go

package service
import (
"fmt"
"os"
"testing"
"github.com/docker/docker/integration-cli/environment"
)
var testEnv *environment.Execution
const dockerdBinary = "dockerd"
func TestMain(m *testing.M) {
var err error
testEnv, err = environment.New()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
// TODO: replace this with `testEnv.Print()` to print the full env
if testEnv.LocalDaemon() {
fmt.Println("INFO: Testing against a local daemon")
} else {
fmt.Println("INFO: Testing against a remote daemon")
}
res := m.Run()
os.Exit(res)
}
func setupTest(t *testing.T) func() {
environment.ProtectImages(t, testEnv)
return func() { testEnv.Clean(t, testEnv.DockerBinary()) }
}