Changeset View
Changeset View
Standalone View
Standalone View
swh/vault/tests/conftest.py
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | for sql_dir, pg in ((SQL_DIR, postgresql), (STORAGE_SQL_DIR, postgresql2)): | ||||
# disable concurrent index creation since we run in a | # disable concurrent index creation since we run in a | ||||
# transaction | # transaction | ||||
cursor.execute(fobj.read().replace('concurrently', '')) | cursor.execute(fobj.read().replace('concurrently', '')) | ||||
pg.commit() | pg.commit() | ||||
vault_config = { | vault_config = { | ||||
'db': db_url('tests', postgresql_proc), | 'db': db_url('tests', postgresql_proc), | ||||
'storage': { | 'storage': { | ||||
'cls': 'validate', | |||||
'storage': { | |||||
'cls': 'local', | 'cls': 'local', | ||||
'args': { | 'args': { | ||||
'db': db_url('tests2', postgresql_proc), | 'db': db_url('tests2', postgresql_proc), | ||||
'objstorage': { | 'objstorage': { | ||||
'cls': 'pathslicing', | 'cls': 'pathslicing', | ||||
'args': { | 'args': { | ||||
'root': str(tmp_path), | 'root': str(tmp_path), | ||||
'slicing': '0:1/1:5', | 'slicing': '0:1/1:5', | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
}, | |||||
'cache': { | 'cache': { | ||||
'cls': 'pathslicing', | 'cls': 'pathslicing', | ||||
'args': { | 'args': { | ||||
'root': str(tmp_path), | 'root': str(tmp_path), | ||||
'slicing': '0:1/1:5', | 'slicing': '0:1/1:5', | ||||
'allow_delete': True, | 'allow_delete': True, | ||||
} | } | ||||
}, | }, | ||||
Show All 14 Lines |