Assert metadata of SLO PUT from container sync
In addition to being in the pure unmolested ondisk format from the source container; the manifest must also include the normally protected X-Static-Large-Object metadata. Change-Id: Ic6638e8258e9dec755f8d9630f0586bd3c9b4420 Related-Change: I8d503419b7996721a671ed6b2795224775a7d8c6 Signed-off-by: Tim Burke <tim.burke@gmail.com>
This commit is contained in:
1 changed files with 7 additions and 1 deletions
@@ -133,7 +133,13 @@ class TestSloMiddleware(SloTestCase):
self.app.register('PUT', path, swob.HTTPCreated, {})
resp_iter = self.slo(req.environ, start_response)
self.assertEqual(b'', b''.join(resp_iter))
self.assertEqual(self.app.calls, [('PUT', path)])
self.assertEqual([
('PUT', path, {
'Host': 'localhost:80',
'Content-Length': str(len(body)),
'X-Static-Large-Object': 'true',
}),
], self.app.calls_with_headers)
self.assertEqual(body, self.app.uploaded[path][1])
self.assertEqual(resp_status[0], '201 Created')
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.