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:
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user