func GetEtcdString(path string) string {
	return string(GetEtcd(path))
}
GetEtcdString gets a string for a given etcd path
package test
import (
	"context"
	"errors"
	"fmt"
	"math/rand"
	"os"
	"os/exec"
	"strings"
	"time"
	etcdclient "github.com/coreos/etcd/clientv3"
	"github.com/docker/docker/api/types/network"
	dockerclient "github.com/docker/docker/client"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega/gexec"
)
var kapi etcdclient.KV
func init() {
	rand.Seed(time.Now().UTC().UnixNano())
	cfg := etcdclient.Config{Endpoints: []string{"http://127.0.0.1:2379"}}
	c, _ := etcdclient.New(cfg)
	kapi = etcdclient.NewKV(c)
}
func GetDockerEndpoint(container, network string) *network.EndpointSettings {
	os.Setenv("DOCKER_API_VERSION", "1.24")
	os.Setenv("DOCKER_HOST", "http://localhost:5375")
	defer os.Setenv("DOCKER_HOST", "")
	cli, err := dockerclient.NewEnvClient()
	if err != nil {
		panic(err)
	}
	info, err := cli.ContainerInspect(context.Background(), container)
	if err != nil {
		panic(err)
	}
	return info.NetworkSettings.Networks[network]
}
func GetNotExists(path string) bool {
	resp, err := kapi.Get(context.Background(), path)
	if err != nil {
		panic(err)
	}
	return len(resp.Kvs) == 0
}
func GetEtcd(path string) []byte {
	resp, err := kapi.Get(context.Background(), path)
	if err != nil {
		panic(err)
	}
	if len(resp.Kvs) != 1 {
		panic(errors.New("no answer"))
	}
	return resp.Kvs[0].Value
}