1
0
mirror of https://github.com/bigchaindb/bigchaindb.git synced 2024-06-28 00:27:45 +02:00

Pass host and port to rethinkdb connection

This is needed when running the tests in containers for instance
This commit is contained in:
Sylvain Bellemare 2017-03-06 15:53:48 +01:00 committed by Sylvain Bellemare
parent 2e398f606f
commit 7e0e46e820

View File

@ -46,7 +46,7 @@ def test_raise_exception_when_max_tries():
conn.run(MockQuery())
def test_reconnect_when_connection_lost():
def test_reconnect_when_connection_lost(db_host, db_port):
from bigchaindb.backend import connect
original_connect = r.connect
@ -54,7 +54,7 @@ def test_reconnect_when_connection_lost():
with patch('rethinkdb.connect') as mock_connect:
mock_connect.side_effect = [
r.ReqlDriverError('mock'),
original_connect()
original_connect(host=db_host, port=db_port)
]
conn = connect()