mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Use parametrized host & port in test
to support docker-based tests or different test envs
This commit is contained in:
parent
7dbd374838
commit
72ba9761d4
@ -32,15 +32,15 @@ def mongodb_connection():
|
||||
port=bigchaindb.config['database']['port'])
|
||||
|
||||
|
||||
def test_get_connection_returns_the_correct_instance():
|
||||
def test_get_connection_returns_the_correct_instance(db_host, db_port):
|
||||
from bigchaindb.backend import connect
|
||||
from bigchaindb.backend.connection import Connection
|
||||
from bigchaindb.backend.mongodb.connection import MongoDBConnection
|
||||
|
||||
config = {
|
||||
'backend': 'mongodb',
|
||||
'host': 'localhost',
|
||||
'port': 27017,
|
||||
'host': db_host,
|
||||
'port': db_port,
|
||||
'name': 'test',
|
||||
'replicaset': 'bigchain-rs'
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user