Example #1
0
func setup(t *testing.T) (*discoverd.Client, func()) {
	killEtcd := runEtcdServer(t)
	client, killDiscoverd := bootDiscoverd(t, "")

	return client, func() {
		client.UnregisterAll()
		client.Close()
		killDiscoverd()
		killEtcd()
	}
}
Example #2
0
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()
	}
}
Example #3
0
func SetupDiscoverd(t TestingT) (*discoverd.Client, func()) {
	killEtcd := RunEtcdServer(t)
	client, killDiscoverd := BootDiscoverd(t, "")

	return client, func() {
		client.UnregisterAll()
		client.Close()
		killDiscoverd()
		killEtcd()
	}
}