Fix up flakey TestContainer.test_PUT_bad_metadata
Change-Id: I7489f2bb95c27d1ddd5e8fa7e5786904100fb567
This commit is contained in:
parent
64e5fd364a
commit
926a024135
@ -296,10 +296,10 @@ class TestContainer(unittest2.TestCase):
|
|||||||
put, name,
|
put, name,
|
||||||
{'X-Container-Meta-' + ('k' * self.max_meta_name_length): 'v'})
|
{'X-Container-Meta-' + ('k' * self.max_meta_name_length): 'v'})
|
||||||
resp.read()
|
resp.read()
|
||||||
self.assertEqual(resp.status, 201)
|
self.assertIn(resp.status, (201, 202))
|
||||||
resp = retry(delete, name)
|
resp = retry(delete, name)
|
||||||
resp.read()
|
resp.read()
|
||||||
self.assertEqual(resp.status, 204)
|
self.assertIn(resp.status, (204, 404))
|
||||||
name = uuid4().hex
|
name = uuid4().hex
|
||||||
resp = retry(
|
resp = retry(
|
||||||
put, name,
|
put, name,
|
||||||
@ -316,10 +316,10 @@ class TestContainer(unittest2.TestCase):
|
|||||||
put, name,
|
put, name,
|
||||||
{'X-Container-Meta-Too-Long': 'k' * self.max_meta_value_length})
|
{'X-Container-Meta-Too-Long': 'k' * self.max_meta_value_length})
|
||||||
resp.read()
|
resp.read()
|
||||||
self.assertEqual(resp.status, 201)
|
self.assertIn(resp.status, (201, 202))
|
||||||
resp = retry(delete, name)
|
resp = retry(delete, name)
|
||||||
resp.read()
|
resp.read()
|
||||||
self.assertEqual(resp.status, 204)
|
self.assertIn(resp.status, (204, 404))
|
||||||
name = uuid4().hex
|
name = uuid4().hex
|
||||||
resp = retry(
|
resp = retry(
|
||||||
put, name,
|
put, name,
|
||||||
@ -337,10 +337,10 @@ class TestContainer(unittest2.TestCase):
|
|||||||
headers['X-Container-Meta-%d' % x] = 'v'
|
headers['X-Container-Meta-%d' % x] = 'v'
|
||||||
resp = retry(put, name, headers)
|
resp = retry(put, name, headers)
|
||||||
resp.read()
|
resp.read()
|
||||||
self.assertEqual(resp.status, 201)
|
self.assertIn(resp.status, (201, 202))
|
||||||
resp = retry(delete, name)
|
resp = retry(delete, name)
|
||||||
resp.read()
|
resp.read()
|
||||||
self.assertEqual(resp.status, 204)
|
self.assertIn(resp.status, (204, 404))
|
||||||
name = uuid4().hex
|
name = uuid4().hex
|
||||||
headers = {}
|
headers = {}
|
||||||
for x in range(self.max_meta_count + 1):
|
for x in range(self.max_meta_count + 1):
|
||||||
@ -367,10 +367,10 @@ class TestContainer(unittest2.TestCase):
|
|||||||
'v' * (self.max_meta_overall_size - size - 1)
|
'v' * (self.max_meta_overall_size - size - 1)
|
||||||
resp = retry(put, name, headers)
|
resp = retry(put, name, headers)
|
||||||
resp.read()
|
resp.read()
|
||||||
self.assertEqual(resp.status, 201)
|
self.assertIn(resp.status, (201, 202))
|
||||||
resp = retry(delete, name)
|
resp = retry(delete, name)
|
||||||
resp.read()
|
resp.read()
|
||||||
self.assertEqual(resp.status, 204)
|
self.assertIn(resp.status, (204, 404))
|
||||||
name = uuid4().hex
|
name = uuid4().hex
|
||||||
headers['X-Container-Meta-k'] = \
|
headers['X-Container-Meta-k'] = \
|
||||||
'v' * (self.max_meta_overall_size - size)
|
'v' * (self.max_meta_overall_size - size)
|
||||||
|
Loading…
Reference in New Issue
Block a user