ensures that transport.Client is closed while using cli.NewClient with *http.Client = nil.

Signed-off-by: qudongfang <qudongfang@gmail.com>
Upstream-commit: 9403a5b63e
Component: cli
This commit is contained in:
qudongfang
2016-09-08 09:57:54 +08:00
parent 412bbe39eb
commit 700f218052
2 changed files with 18 additions and 0 deletions

View File

@ -133,6 +133,11 @@ func TestGetAPIPath(t *testing.T) {
if g != cs.e {
t.Fatalf("Expected %s, got %s", cs.e, g)
}
err = c.Close()
if nil != err {
t.Fatalf("close client failed, error message: %s", err)
}
}
}