mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
client: test httpClusterClient.reset failure cases
This commit is contained in:
parent
ed173a2a76
commit
99aa0e1fcc
@ -636,3 +636,21 @@ func TestHTTPClusterClientSyncFail(t *testing.T) {
|
||||
t.Fatalf("incorrect endpoints after failed Sync: want=%#v got=%#v", want, got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestHTTPClusterClientResetFail(t *testing.T) {
|
||||
tests := [][]string{
|
||||
// need at least one endpoint
|
||||
[]string{},
|
||||
|
||||
// urls must be valid
|
||||
[]string{":"},
|
||||
}
|
||||
|
||||
for i, tt := range tests {
|
||||
hc := &httpClusterClient{}
|
||||
err := hc.reset(tt)
|
||||
if err == nil {
|
||||
t.Errorf("#%d: expected non-nil error", i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user