Merge pull request #60299 from sttts/sttts-prepare-for-etcd-3.2.16

Automatic merge from submit-queue (batch tested with PRs 57672, 60299, 59757, 60283, 60265). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apiserver: fix testing etcd config in preparation for etcd 3.2.16+

The AuthToken must be set, also in non-https mode. Otherwise, etcd refuses to start.
This commit is contained in:
Kubernetes Submit Queue 2018-02-23 21:21:41 -08:00 committed by GitHub
commit 4414950ea6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,6 @@ func configureTestCluster(t *testing.T, name string, https bool) *EtcdTestServer
if err != nil {
t.Fatal(err)
}
m.AuthToken = "simple"
} else {
cln := newLocalListener(t)
m.ClientListeners = []net.Listener{cln}
@ -165,6 +164,7 @@ func configureTestCluster(t *testing.T, name string, https bool) *EtcdTestServer
}
}
m.AuthToken = "simple"
m.Name = name
m.DataDir, err = ioutil.TempDir(baseDir, "etcd")
if err != nil {