func setup(t *testing.T) (*discoverd.Client, func()) { killEtcd := runEtcdServer(t) client, killDiscoverd := bootDiscoverd(t, "") return client, func() { client.UnregisterAll() client.Close() killDiscoverd() killEtcd() } }
func SetupDiscoverdWithEtcd(t TestingT) (*discoverd.Client, string, func()) { etcdAddr, killEtcd := RunEtcdServer(t) client, killDiscoverd := BootDiscoverd(t, "", etcdAddr) return client, etcdAddr, func() { client.UnregisterAll() client.Close() killDiscoverd() killEtcd() } }
func SetupDiscoverd(t TestingT) (*discoverd.Client, func()) { killEtcd := RunEtcdServer(t) client, killDiscoverd := BootDiscoverd(t, "") return client, func() { client.UnregisterAll() client.Close() killDiscoverd() killEtcd() } }