From d5ebf36f7e9268b68b2e8d5b737f8252c5296e1a Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Tue, 11 Feb 2014 11:43:09 -0500 Subject: Sync with OpenStack Swift v1.12.0 * Bumped the version of gluster-swift to v1.12.0. * Added document on how to do a sync Change-Id: I676e110759b0bce3007a2a38f3b384b4ca9d710d Signed-off-by: Luis Pabon Reviewed-on: http://review.gluster.org/6977 Reviewed-by: Prashanth Pai Reviewed-by: Chetan Risbud Tested-by: Chetan Risbud --- test/functional/tests.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'test/functional/tests.py') diff --git a/test/functional/tests.py b/test/functional/tests.py index e4b778b..9469cff 100644 --- a/test/functional/tests.py +++ b/test/functional/tests.py @@ -2001,16 +2001,34 @@ class TestSlo(Base): def test_slo_copy_the_manifest(self): file_item = self.env.container.file("manifest-abcde") - file_item.copy(self.env.container.name, "copied-abcde", + file_item.copy(self.env.container.name, "copied-abcde-manifest-only", parms={'multipart-manifest': 'get'}) - copied = self.env.container.file("copied-abcde") + copied = self.env.container.file("copied-abcde-manifest-only") copied_contents = copied.read(parms={'multipart-manifest': 'get'}) try: json.loads(copied_contents) except ValueError: self.fail("COPY didn't copy the manifest (invalid json on GET)") + def test_slo_get_the_manifest(self): + manifest = self.env.container.file("manifest-abcde") + got_body = manifest.read(parms={'multipart-manifest': 'get'}) + + self.assertEqual('application/json; charset=utf-8', + manifest.content_type) + try: + json.loads(got_body) + except ValueError: + self.fail("GET with multipart-manifest=get got invalid json") + + def test_slo_head_the_manifest(self): + manifest = self.env.container.file("manifest-abcde") + got_info = manifest.info(parms={'multipart-manifest': 'get'}) + + self.assertEqual('application/json; charset=utf-8', + got_info['content_type']) + class TestSloUTF8(Base2, TestSlo): set_up = False -- cgit