diff options
author | drebs <drebs@leap.se> | 2016-07-25 06:58:26 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2016-08-01 21:09:03 -0300 |
commit | 1dc48b603869db1bfcd9c0f86ae3973b715f9222 (patch) | |
tree | 73789bf649c5806e72202338e546ad55fbc943ab /testing/tests/perf/test_sync.py | |
parent | fa2c50b9c6cc037a8ab348b5a746b2e728f3068a (diff) |
[test] allow custom couch url for perf tests
Diffstat (limited to 'testing/tests/perf/test_sync.py')
-rw-r--r-- | testing/tests/perf/test_sync.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/testing/tests/perf/test_sync.py b/testing/tests/perf/test_sync.py index fbe3b877..9de733fb 100644 --- a/testing/tests/perf/test_sync.py +++ b/testing/tests/perf/test_sync.py @@ -10,7 +10,7 @@ content = ' ' * 10000 @pytest.inlineCallbacks -def test_upload(soledad_client): +def test_upload(soledad_client, request): # create a bunch of local documents uploads = 100 deferreds = [] @@ -23,16 +23,18 @@ def test_upload(soledad_client): yield soledad_client.sync() # check that documents reached the remote database - remote = CouchDatabase('http://127.0.0.1:5984', 'user-0') + url = request.config.getoption('--couch-url') + remote = CouchDatabase(url, 'user-0') remote_count, _ = remote.get_all_docs() assert remote_count == uploads @pytest.inlineCallbacks -def test_download(soledad_client): +def test_download(soledad_client, request): # create a bunch of remote documents downloads = 100 - remote = CouchDatabase('http://127.0.0.1:5984', 'user-0') + url = request.config.getoption('--couch-url') + remote = CouchDatabase(url, 'user-0') for i in xrange(downloads): doc = ServerDocument('doc-%d' % i, 'replica:1') doc.content = {'download': True, 'content': content} |