summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-08-10 04:34:30 -0300
committerKali Kaneko <kali@leap.se>2017-08-11 18:52:10 -0400
commit9703a03cff56f7ea0e97f6275637d137bbcc2544 (patch)
treeaa9bef056d331c02592c54f6a10b7a069a3d6ff6 /testing
parent11f0f9b2ffe2eb58e3eb9e875a1003bc7302a2d2 (diff)
[bug] track namespace information on blobs client
A reported bug on namespace feature was that we couldn't delete a namespaced blob after a cold start, since the client wasn't able to check which namespace it belongs. This commits completes the tracking of namespace over client site code, making it possible to query and store namespce information on disk, through sqlcipher. -- Resolves: #8882
Diffstat (limited to 'testing')
-rw-r--r--testing/tests/blobs/test_blob_manager.py5
-rw-r--r--testing/tests/blobs/test_sqlcipher_client_backend.py2
2 files changed, 4 insertions, 3 deletions
diff --git a/testing/tests/blobs/test_blob_manager.py b/testing/tests/blobs/test_blob_manager.py
index 56bea87a..3f0bf8c4 100644
--- a/testing/tests/blobs/test_blob_manager.py
+++ b/testing/tests/blobs/test_blob_manager.py
@@ -50,7 +50,7 @@ class BlobManagerTestCase(unittest.TestCase):
bad_blob_id = 'inexsistent_id'
result = yield self.manager.get(bad_blob_id)
self.assertIsNone(result)
- args = bad_blob_id, None
+ args = bad_blob_id, 'default'
self.manager._download_and_decrypt.assert_called_once_with(*args)
@defer.inlineCallbacks
@@ -143,4 +143,5 @@ class BlobManagerTestCase(unittest.TestCase):
yield self.manager.delete(blob_id)
local_list = yield self.manager.local_list()
self.assertEquals(0, len(local_list))
- self.manager._delete_from_remote.assert_called_with(blob_id)
+ params = {'namespace': 'default'}
+ self.manager._delete_from_remote.assert_called_with(blob_id, **params)
diff --git a/testing/tests/blobs/test_sqlcipher_client_backend.py b/testing/tests/blobs/test_sqlcipher_client_backend.py
index b67215e8..6193b486 100644
--- a/testing/tests/blobs/test_sqlcipher_client_backend.py
+++ b/testing/tests/blobs/test_sqlcipher_client_backend.py
@@ -71,4 +71,4 @@ class SQLBackendTestCase(unittest.TestCase):
len(content)))
yield defer.gatherResults(deferreds)
result = yield self.local.list()
- self.assertEquals(blob_ids, result)
+ self.assertEquals(set(blob_ids), set(result))