rackerlabs / mimic

An API mock service
Other
167 stars 57 forks source link

Swift mock doesn't support sub-paths for objects #645

Closed BenjamenMeyer closed 8 years ago

BenjamenMeyer commented 8 years ago

While testing Cloud Backup API I found that the container would be created but then a 404 would be returned when trying to upload the object. Turns out it was due to the URL formation.

Swift has a very greedy object naming rule. Essentially the URL is /v1/<container>/<objectname> and <objectname> may also contain additional folders to separate data.

In my case, /v1/CloudBackupLogs was being created, but then /v1/CloudBackupLogs/<UUID>/<timestamp>.gz, the extra layer of the <UUID> caused the Swift Mock to fail. My guess is that the app.route did not find a match against the URL.