Fix full database test script to not fail randomly
- Switches database schema creation to alembic, which solves the MySQL issue (and makes sure we test migrations as well) - Adds a few time.sleep(1) to work around MySQL's second-precision issue when adding items to queues and then immediately retrieving them - Disables the storage proxy tests when running against non-SQLite databases, as it causes failures with the multiple process and multiple transactions - Changes initdb to support only populating the database, as well as fixing a few small items around the test data when working with non-SQLite data
This commit is contained in:
parent
244bf2a070
commit
e6ee538e15
5 changed files with 41 additions and 19 deletions
|
@ -47,6 +47,7 @@ class TestStorageProxy(LiveServerTestCase):
|
|||
self.test_app.config['DISTRIBUTED_STORAGE_PREFERENCE'] = ['test']
|
||||
return self.test_app
|
||||
|
||||
@unittest.skipIf(os.environ.get('TEST_DATABASE_URI'), "not supported for non SQLite testing")
|
||||
def test_storage_proxy_auth_notinstalled(self):
|
||||
# Active direct download on the fake storage.
|
||||
self.storage.put_content(['test'], 'supports_direct_download', 'true')
|
||||
|
@ -65,6 +66,7 @@ class TestStorageProxy(LiveServerTestCase):
|
|||
self.assertEquals(404, resp.status_code)
|
||||
|
||||
|
||||
@unittest.skipIf(os.environ.get('TEST_DATABASE_URI'), "not supported for non SQLite testing")
|
||||
def test_storage_proxy_auth(self):
|
||||
# Active direct download on the fake storage.
|
||||
self.storage.put_content(['test'], 'supports_direct_download', 'true')
|
||||
|
|
Reference in a new issue