Closed 4xicom closed 4 years ago
The tests failed with this - can you fix up?
--- FAIL: TestDLOInsert (0.00s)
panic: assignment to entry in nil map [recovered]
panic: assignment to entry in nil map
goroutine 1962 [running]:
testing.tRunner.func1(0xc00051d000)
/home/travis/.gimme/versions/go1.12.6.linux.amd64/src/testing/testing.go:830 +0x392
panic(0x79c3c0, 0x883940)
/home/travis/.gimme/versions/go1.12.6.linux.amd64/src/runtime/panic.go:522 +0x1b5
github.com/ncw/swift.(*Connection).createDLOManifest(0xc000438000, 0x80b61e, 0xf, 0x809ffa, 0xb, 0xc0002be0b0, 0xa1, 0x0, 0x0, 0x0, ...)
/home/travis/gopath/src/github.com/ncw/swift/dlo.go:72 +0x53
github.com/ncw/swift.(*DynamicLargeObjectCreateFile).Flush(0xc00031f040, 0x8, 0x0)
/home/travis/gopath/src/github.com/ncw/swift/dlo.go:91 +0x11f
github.com/ncw/swift.(*DynamicLargeObjectCreateFile).Close(0xc00031f040, 0x0, 0x0)
/home/travis/gopath/src/github.com/ncw/swift/dlo.go:87 +0x2b
github.com/ncw/swift.(*bufferedLargeObjectFile).Close(0xc000506de0, 0xc000506de0, 0x808155)
/home/travis/gopath/src/github.com/ncw/swift/largeobjects.go:423 +0x68
github.com/ncw/swift_test.makeConnectionWithDLO(0xc00051d000, 0x45d6e0, 0xe)
/home/travis/gopath/src/github.com/ncw/swift/swift_test.go:256 +0x2b2
github.com/ncw/swift_test.TestDLOInsert(0xc00051d000)
/home/travis/gopath/src/github.com/ncw/swift/swift_test.go:2030 +0x43
testing.tRunner(0xc00051d000, 0x822ad0)
/home/travis/.gimme/versions/go1.12.6.linux.amd64/src/testing/testing.go:865 +0xc0
created by testing.(*T).Run
/home/travis/.gimme/versions/go1.12.6.linux.amd64/src/testing/testing.go:916 +0x35a
exit status 2
FAIL github.com/ncw/swift 0.489s
The command "go test" exited with 1.
sure.
Fixed
@ncw
Apologies for the delay in responding, I've been on vacation.
That looks great now - thank you very much - I'll merge it now
headers are now passed in when creating dynamic large object. When dynamic large object move, headers are also kept.