johannesboyne / gofakes3

A simple fake AWS S3 object storage (used for local test-runs against AWS S3 APIs)
MIT License
358 stars 81 forks source link

ListObject startAfter not working when key does not exist (s3mem) #87

Closed Alfus closed 7 months ago

Alfus commented 8 months ago

If you have objects named "1", "3" in a bucket, then request "startAfter=2", the iterator will point to "3" after https://github.com/johannesboyne/gofakes3/blob/f7e9c41d81b23d3e28987b9e5e33885f81c035e6/backend/s3mem/backend.go#L95 which will then be skipped past at https://github.com/johannesboyne/gofakes3/blob/f7e9c41d81b23d3e28987b9e5e33885f81c035e6/backend/s3mem/backend.go#L102

I believe that line 95 should only move past the result if it is equal to the marker (which appear to be a noop directly after a seek)

Alfus commented 8 months ago

See https://github.com/johannesboyne/gofakes3/pull/88