mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Add pytest option to switch backend in tests
This commit is contained in:
parent
0a14f97a18
commit
95b353459d
@ -113,7 +113,7 @@ def test_env_config(monkeypatch):
|
||||
assert result == expected
|
||||
|
||||
|
||||
def test_autoconfigure_read_both_from_file_and_env(monkeypatch):
|
||||
def test_autoconfigure_read_both_from_file_and_env(monkeypatch, request):
|
||||
file_config = {
|
||||
'database': {'host': 'test-host'},
|
||||
'backlog_reassign_delay': 5
|
||||
@ -136,7 +136,7 @@ def test_autoconfigure_read_both_from_file_and_env(monkeypatch):
|
||||
'threads': None,
|
||||
},
|
||||
'database': {
|
||||
'backend': 'rethinkdb',
|
||||
'backend': request.config.getoption('--database-backend'),
|
||||
'host': 'test-host',
|
||||
'port': 4242,
|
||||
'name': 'test-dbname',
|
||||
|
@ -1,5 +1,3 @@
|
||||
from collections import namedtuple
|
||||
|
||||
from rethinkdb.ast import RqlQuery
|
||||
|
||||
import pytest
|
||||
@ -9,7 +7,7 @@ import pytest
|
||||
def config(request, monkeypatch):
|
||||
config = {
|
||||
'database': {
|
||||
'backend': 'rethinkdb',
|
||||
'backend': request.config.getoption('--database-backend'),
|
||||
'host': 'host',
|
||||
'port': 28015,
|
||||
'name': 'bigchain',
|
||||
|
Loading…
x
Reference in New Issue
Block a user