Spelling mistakes corrected in comments.
Change-Id: Ibbd7511c3a2b08519feb4db18eca6e000603ea32
This commit is contained in:
parent
c5013783ac
commit
2a8b43e5e7
@ -1416,7 +1416,7 @@ class TestContainer(unittest.TestCase):
|
|||||||
self.assertEquals(headers.get('x-storage-policy'),
|
self.assertEquals(headers.get('x-storage-policy'),
|
||||||
policy['name'])
|
policy['name'])
|
||||||
|
|
||||||
# and test recreate with-out specifiying Storage Policy
|
# and test recreate with-out specifying Storage Policy
|
||||||
resp = retry(put)
|
resp = retry(put)
|
||||||
resp.read()
|
resp.read()
|
||||||
self.assertEqual(resp.status, 202)
|
self.assertEqual(resp.status, 202)
|
||||||
|
@ -1050,7 +1050,7 @@ class TestAccountBrokerBeforeSPI(TestAccountBroker):
|
|||||||
self.assertEqual(len(called), 1)
|
self.assertEqual(len(called), 1)
|
||||||
self.assert_('CREATE TABLE policy_stat' in called[0])
|
self.assert_('CREATE TABLE policy_stat' in called[0])
|
||||||
|
|
||||||
# nothing was commited
|
# nothing was committed
|
||||||
broker = AccountBroker(db_path, account='a')
|
broker = AccountBroker(db_path, account='a')
|
||||||
with broker.get() as conn:
|
with broker.get() as conn:
|
||||||
try:
|
try:
|
||||||
|
@ -446,7 +446,7 @@ class TestTimestamp(unittest.TestCase):
|
|||||||
self.assertTrue(float(timestamp) < maximum,
|
self.assertTrue(float(timestamp) < maximum,
|
||||||
'%f is not smaller than %f given %r' % (
|
'%f is not smaller than %f given %r' % (
|
||||||
timestamp, maximum, value))
|
timestamp, maximum, value))
|
||||||
# direct comparision of timestamp works too
|
# direct comparison of timestamp works too
|
||||||
self.assertTrue(timestamp > minimum,
|
self.assertTrue(timestamp > minimum,
|
||||||
'%s is not bigger than %f given %r' % (
|
'%s is not bigger than %f given %r' % (
|
||||||
timestamp.normal, minimum, value))
|
timestamp.normal, minimum, value))
|
||||||
|
@ -849,7 +849,7 @@ class TestReconciler(unittest.TestCase):
|
|||||||
self.assertEqual(self.reconciler.stats['unavailable_container'], 1)
|
self.assertEqual(self.reconciler.stats['unavailable_container'], 1)
|
||||||
# we don't clean up anything
|
# we don't clean up anything
|
||||||
self.assertEqual(self.reconciler.stats['cleanup_object'], 0)
|
self.assertEqual(self.reconciler.stats['cleanup_object'], 0)
|
||||||
# and we definately should not pop_queue
|
# and we definitely should not pop_queue
|
||||||
self.assertFalse(deleted_container_entries)
|
self.assertFalse(deleted_container_entries)
|
||||||
self.assertEqual(self.reconciler.stats['retry'], 1)
|
self.assertEqual(self.reconciler.stats['retry'], 1)
|
||||||
|
|
||||||
@ -1001,7 +1001,7 @@ class TestReconciler(unittest.TestCase):
|
|||||||
delete_headers.get('X-Backend-Storage-Policy-Index'), '1')
|
delete_headers.get('X-Backend-Storage-Policy-Index'), '1')
|
||||||
# and when we're done, we pop the entry from the queue
|
# and when we're done, we pop the entry from the queue
|
||||||
self.assertEqual(self.reconciler.stats['pop_queue'], 1)
|
self.assertEqual(self.reconciler.stats['pop_queue'], 1)
|
||||||
# this mock recieved the name, it's encoded down in buffered_http
|
# this mock received the name, it's encoded down in buffered_http
|
||||||
self.assertEqual(deleted_container_entries,
|
self.assertEqual(deleted_container_entries,
|
||||||
[('.misplaced_objects', '3600', '1:/%s' % obj_name)])
|
[('.misplaced_objects', '3600', '1:/%s' % obj_name)])
|
||||||
self.assertEqual(self.reconciler.stats['success'], 1)
|
self.assertEqual(self.reconciler.stats['success'], 1)
|
||||||
|
@ -586,7 +586,7 @@ class TestContainerController(unittest.TestCase):
|
|||||||
self.assertEqual(resp.headers['X-Backend-Storage-Policy-Index'],
|
self.assertEqual(resp.headers['X-Backend-Storage-Policy-Index'],
|
||||||
str(non_default_policy.idx))
|
str(non_default_policy.idx))
|
||||||
|
|
||||||
# put again without specifiying the storage policy
|
# put again without specifying the storage policy
|
||||||
req = Request.blank('/sda1/p/a/c', method='PUT', headers={
|
req = Request.blank('/sda1/p/a/c', method='PUT', headers={
|
||||||
'X-Timestamp': ts.next(),
|
'X-Timestamp': ts.next(),
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user