ncw / swift

Go language interface to Swift / Openstack Object Storage / Rackspace cloud files (golang)
MIT License
310 stars 107 forks source link

headers are not processed when creating dynamic large object. fixes #147 #148

Closed 4xicom closed 4 years ago

4xicom commented 5 years ago

headers are now passed in when creating dynamic large object. When dynamic large object move, headers are also kept.

ncw commented 5 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.
4xicom commented 5 years ago

sure.

4xicom commented 5 years ago

Fixed

4xicom commented 4 years ago

@ncw

ncw commented 4 years ago

Apologies for the delay in responding, I've been on vacation.

That looks great now - thank you very much - I'll merge it now