mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
support etcd credentials in etcd plugin (#2442)
* support etcd credentials in etcd plugin fixes #2441 * try to fix cleanup of authentication
This commit is contained in:
committed by
Miek Gieben
parent
b455f86824
commit
d878eeebbb
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user