swift icon indicating copy to clipboard operation
swift copied to clipboard

Update documentation and tests on updating Content-Type

Open thiagodasilva opened this issue 5 years ago • 5 comments

Newer swift no longer requires a copy in place to update content-type.

Updated a bit of the docs and added test to demonstrate the differences in behavior when using ObjectUpdateContentType and ObjectUpdate to update Content-Type

Signed-off-by: Thiago da Silva [email protected]

thiagodasilva avatar Nov 07 '19 10:11 thiagodasilva

This code looks nice too! However we have problems running the tests on older swift versions - any ideas?

ncw avatar Nov 12 '19 13:11 ncw

I think in this case, there's an issue with the swift emulator, here: https://github.com/ncw/swift/blob/master/swifttest/server.go#L198,L209

It's always adding new custom metadata to an object, when in fact, whenever you post to an object, the previous custom headers are lost. This has always been the swift behavior. I'm adding a new test to clearly show the functionality.

thiagodasilva avatar Nov 13 '19 14:11 thiagodasilva

Looks like we are going to need a fix to the emulator to get this to pass the tests! Are you working on that?

ncw avatar Nov 13 '19 16:11 ncw

@ncw I haven't looked at fixing the emulator yet. Having said that, would you consider running the travis ci tests against a docker saio image? I think it would make more sense that maintaining a swift emulator, thoughts?

thiagodasilva avatar Nov 14 '19 10:11 thiagodasilva

@ncw I haven't looked at fixing the emulator yet. Having said that, would you consider running the travis ci tests against a docker saio image? I think it would make more sense that maintaining a swift emulator, thoughts?

I think I'd like to do both - fix the emulator and run against the swift aio!

ncw avatar Nov 17 '19 16:11 ncw