findify / s3mock

Embedded S3 server for easy mocking
MIT License
387 stars 107 forks source link

Honor object metadata modified date during put or upload calls #119

Open pintohutch opened 6 years ago

pintohutch commented 6 years ago

Currently, the s3 client overwrites the the lastModified date on put and upload calls. The client should check if this field is explicitly set in the incoming metadata before defaulting to org.joda.time.DateTime.now().toDate. This would enable modified timestamp-based unit testing on s3 objects (e.g. letting test cases choose specific timestamps of objects they're storing to the client other than now()).