mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix test
This commit is contained in:
parent
5357fb431e
commit
1527b7008c
@ -31,7 +31,6 @@ type errorHandler func(http.ResponseWriter, *http.Request) error
|
||||
|
||||
func (fn errorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
if e := fn(w, r); e != nil {
|
||||
fmt.Println(e)
|
||||
if etcdErr, ok := e.(etcdErr.Error); ok {
|
||||
debug("Return error: ", etcdErr.Error())
|
||||
etcdErr.Write(w)
|
||||
|
@ -176,7 +176,7 @@ func Monitor(size int, allowDeadNum int, leaderChan chan string, all chan bool,
|
||||
|
||||
func getLeader(addr string) (string, error) {
|
||||
|
||||
resp, err := client.Get(addr + "/leader")
|
||||
resp, err := client.Get(addr + "/v1/leader")
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
@ -116,7 +116,7 @@ func (c *Client) SyncCluster() bool {
|
||||
// sync cluster information by providing machine list
|
||||
func (c *Client) internalSyncCluster(machines []string) bool {
|
||||
for _, machine := range machines {
|
||||
httpPath := c.createHttpPath(machine, "machines")
|
||||
httpPath := c.createHttpPath(machine, "v1/machines")
|
||||
resp, err := c.httpClient.Get(httpPath)
|
||||
if err != nil {
|
||||
// try another machine in the cluster
|
||||
|
Loading…
x
Reference in New Issue
Block a user