mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdhttp: test bad url for POST on admin endopint
This commit is contained in:
parent
d00152765a
commit
6d9eb57555
@ -1444,6 +1444,18 @@ func TestServeAdminMembersFail(t *testing.T) {
|
||||
|
||||
http.StatusBadRequest,
|
||||
},
|
||||
{
|
||||
// bad url
|
||||
&http.Request{
|
||||
URL: mustNewURL(t, adminMembersPrefix),
|
||||
Method: "POST",
|
||||
Body: ioutil.NopCloser(strings.NewReader(url.Values{"PeerURLs": []string{"http://bad"}}.Encode())),
|
||||
Header: map[string][]string{"Content-Type": []string{"application/x-www-form-urlencoded"}},
|
||||
},
|
||||
&errServer{},
|
||||
|
||||
http.StatusBadRequest,
|
||||
},
|
||||
{
|
||||
// etcdserver.AddMember error
|
||||
&http.Request{
|
||||
|
Loading…
x
Reference in New Issue
Block a user