mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Set default of database-backend to env var if set
This commit is contained in:
parent
b2c6474d35
commit
2f4ee4d8b9
@ -33,9 +33,12 @@ def pytest_addoption(parser):
|
||||
from bigchaindb.backend import connection
|
||||
|
||||
backends = ', '.join(connection.BACKENDS.keys())
|
||||
|
||||
parser.addoption('--database-backend', action='store', default='rethinkdb',
|
||||
help='Defines the backend to use (available: {})'.format(backends))
|
||||
parser.addoption(
|
||||
'--database-backend',
|
||||
action='store',
|
||||
default=os.environ.get('BIGCHAINDB_DATABASE_BACKEND', 'rethinkdb'),
|
||||
help='Defines the backend to use (available: {})'.format(backends),
|
||||
)
|
||||
|
||||
|
||||
# We need this function to avoid loading an existing
|
||||
|
Loading…
x
Reference in New Issue
Block a user