don't close the top-level addr

See https://github.com/ipfs/go-ipfs-http-client/pull/10/files#r269268326


This commit was moved from ipfs/interface-go-ipfs-core@1b707f2943

This commit was moved from ipfs/boxo@21ade61b10
This commit is contained in:
Steven Allen 2019-03-26 19:01:23 +00:00
parent 52c10ba876
commit 6c4219a102

View File

@ -834,6 +834,7 @@ type closeTestD struct {
}
func (f *closeTestD) Close() error {
f.t.Helper()
if f.closed {
f.t.Fatal("already closed")
}
@ -874,8 +875,6 @@ func (tp *provider) TestAddCloses(t *testing.T) {
t.Error(err)
}
d0.Close() // Adder doesn't close top-level file
for i, n := range []*closeTestF{n1, n2, n4} {
if !n.closed {
t.Errorf("file %d not closed!", i)