Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/tests/test_archiver.py
| Show All 31 Lines | class TestArchiver(DbTestFixture, ServerTestFixture, | ||||
| """ | """ | ||||
| TEST_DB_DUMP = os.path.join(TEST_DATA_DIR, 'dumps/swh.dump') | TEST_DB_DUMP = os.path.join(TEST_DATA_DIR, 'dumps/swh.dump') | ||||
| def setUp(self): | def setUp(self): | ||||
| # Launch the backup server | # Launch the backup server | ||||
| self.backup_objroot = tempfile.mkdtemp(prefix='remote') | self.backup_objroot = tempfile.mkdtemp(prefix='remote') | ||||
| self.config = {'storage_base': self.backup_objroot, | self.config = {'storage_base': self.backup_objroot, | ||||
| 'storage_depth': 3} | 'storage_slicing': '0:2/2:4/4:6'} | ||||
| self.app = app | self.app = app | ||||
| super().setUp() | super().setUp() | ||||
| # Launch a client to check objects presence | # Launch a client to check objects presence | ||||
| print("url", self.url()) | print("url", self.url()) | ||||
| self.remote_objstorage = RemoteObjStorage(self.url()) | self.remote_objstorage = RemoteObjStorage(self.url()) | ||||
| # Create the local storage. | # Create the local storage. | ||||
| self.objroot = tempfile.mkdtemp(prefix='local') | self.objroot = tempfile.mkdtemp(prefix='local') | ||||
| ▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines | |||||