aboutsummaryrefslogtreecommitdiff
path: root/test/etcd_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/etcd_test.go')
-rw-r--r--test/etcd_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/etcd_test.go b/test/etcd_test.go
index 2b90c3a6c..d03f7ce3d 100644
--- a/test/etcd_test.go
+++ b/test/etcd_test.go
@@ -23,6 +23,16 @@ func etcdPlugin() *etcd.Etcd {
return &etcd.Etcd{Client: cli, PathPrefix: "/skydns"}
}
+func etcdPluginWithCredentials(username, password string) *etcd.Etcd {
+ etcdCfg := etcdcv3.Config{
+ Endpoints: []string{"http://localhost:2379"},
+ Username: username,
+ Password: password,
+ }
+ cli, _ := etcdcv3.New(etcdCfg)
+ return &etcd.Etcd{Client: cli, PathPrefix: "/skydns"}
+}
+
// This test starts two coredns servers (and needs etcd). Configure a stubzones in both (that will loop) and
// will then test if we detect this loop.
func TestEtcdStubLoop(t *testing.T) {