summaryrefslogtreecommitdiffstats
path: root/test/unit/proxy/test_server.py
diff options
context:
space:
mode:
authorLuis Pabon <lpabon@redhat.com>2013-11-26 20:21:10 -0500
committerLuis Pabon <lpabon@redhat.com>2013-12-05 11:47:20 -0800
commitf3c8c36cddbf1801443af431bc7db2e6d844eaed (patch)
treea58f3b7ab9bd2c099036e1467fd514380c62eff2 /test/unit/proxy/test_server.py
parent74d0b1ca0d0a08608285b1772eb1ac8f48d25632 (diff)
Return BadRequest on X-Delete-At/After headers
Gluster-swift does not support X-Delete-After or X-Delete-At headers. The code needs to inform the caller with a 400-BadRequest if they use these headers. Change-Id: Ic9d3a1646c0d26bb0204245efce4501f7479fee6 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6364 Reviewed-by: Chetan Risbud <crisbud@redhat.com> Reviewed-on: http://review.gluster.org/6444
Diffstat (limited to 'test/unit/proxy/test_server.py')
-rw-r--r--test/unit/proxy/test_server.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py
index 490e8fc..25976ba 100644
--- a/test/unit/proxy/test_server.py
+++ b/test/unit/proxy/test_server.py
@@ -4354,6 +4354,7 @@ class TestObjectController(unittest.TestCase):
self.assert_(called[0])
def test_POST_converts_delete_after_to_delete_at(self):
+ raise SkipTest("X-Delete-At and X-Delete-After are not supported")
with save_globals():
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
@@ -4390,6 +4391,7 @@ class TestObjectController(unittest.TestCase):
time.time = orig_time
def test_POST_non_int_delete_after(self):
+ raise SkipTest("X-Delete-At and X-Delete-After are not supported")
with save_globals():
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
@@ -4404,6 +4406,7 @@ class TestObjectController(unittest.TestCase):
self.assertTrue('Non-integer X-Delete-After' in res.body)
def test_POST_negative_delete_after(self):
+ raise SkipTest("X-Delete-At and X-Delete-After are not supported")
with save_globals():
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
@@ -4418,6 +4421,7 @@ class TestObjectController(unittest.TestCase):
self.assertTrue('X-Delete-At in past' in res.body)
def test_POST_delete_at(self):
+ raise SkipTest("X-Delete-At and X-Delete-After are not supported")
with save_globals():
given_headers = {}
@@ -4462,6 +4466,7 @@ class TestObjectController(unittest.TestCase):
self.assertTrue('X-Delete-At in past' in resp.body)
def test_PUT_converts_delete_after_to_delete_at(self):
+ raise SkipTest("X-Delete-At and X-Delete-After are not supported")
with save_globals():
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
@@ -4484,6 +4489,7 @@ class TestObjectController(unittest.TestCase):
time.time = orig_time
def test_PUT_non_int_delete_after(self):
+ raise SkipTest("X-Delete-At and X-Delete-After are not supported")
with save_globals():
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
@@ -4499,6 +4505,7 @@ class TestObjectController(unittest.TestCase):
self.assertTrue('Non-integer X-Delete-After' in res.body)
def test_PUT_negative_delete_after(self):
+ raise SkipTest("X-Delete-At and X-Delete-After are not supported")
with save_globals():
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
@@ -4514,6 +4521,7 @@ class TestObjectController(unittest.TestCase):
self.assertTrue('X-Delete-At in past' in res.body)
def test_PUT_delete_at(self):
+ raise SkipTest("X-Delete-At and X-Delete-After are not supported")
with save_globals():
given_headers = {}
@@ -4890,6 +4898,7 @@ class TestObjectController(unittest.TestCase):
@mock.patch('time.time', new=lambda: STATIC_TIME)
def test_PUT_x_delete_at_with_fewer_container_replicas(self):
+ raise SkipTest("X-Delete-At and X-Delete-After are not supported")
self.app.container_ring.set_replicas(2)
delete_at_timestamp = int(time.time()) + 100000
@@ -4925,6 +4934,7 @@ class TestObjectController(unittest.TestCase):
@mock.patch('time.time', new=lambda: STATIC_TIME)
def test_PUT_x_delete_at_with_more_container_replicas(self):
+ raise SkipTest("X-Delete-At and X-Delete-After are not supported")
self.app.container_ring.set_replicas(4)
self.app.expiring_objects_account = 'expires'
self.app.expiring_objects_container_divisor = 60