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.
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 additionalfolders
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 theapp.route
did not find a match against the URL.