mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
d04c177a10
Signed-off-by: Chun Chen <ramichen@tencent.com>
20 lines
453 B
Go
20 lines
453 B
Go
package libnetwork
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/docker/libnetwork/config"
|
|
)
|
|
|
|
func TestZooKeeperBackend(t *testing.T) {
|
|
testNewController(t, "zk", "127.0.0.1:2181")
|
|
}
|
|
|
|
func testNewController(t *testing.T, provider, url string) error {
|
|
netOptions := []config.Option{}
|
|
netOptions = append(netOptions, config.OptionKVProvider(provider))
|
|
netOptions = append(netOptions, config.OptionKVProviderURL(url))
|
|
|
|
_, err := New(netOptions...)
|
|
return err
|
|
}
|