summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-11-21 16:18:01 -0300
committerdrebs <drebs@riseup.net>2017-11-22 08:23:59 -0200
commitd5cb08f660fbb9172a19ce5cae4cf640f1ba07f1 (patch)
treebf86935e48aac59ebba71fbcc758f4406f5fde06 /tests
parentf429355952bf008f9fa768b5c7f6186de4238bd5 (diff)
[bug] remove SOLEDAD_COUCH_URL test env
It was None for parallel tests and there is already a mechanism in place for setting this URL, which avoids it being set in two different places.
Diffstat (limited to 'tests')
-rw-r--r--tests/server/test_tac.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/server/test_tac.py b/tests/server/test_tac.py
index 7f52481c..45bbb142 100644
--- a/tests/server/test_tac.py
+++ b/tests/server/test_tac.py
@@ -36,6 +36,7 @@ from twisted.web.client import Agent
TAC_FILE_PATH = resource_filename('leap.soledad.server', 'server.tac')
+@pytest.mark.usefixtures("couch_url")
class TacServerTestCase(unittest.TestCase):
def test_tac_file_exists(self):
@@ -68,14 +69,12 @@ class TacServerTestCase(unittest.TestCase):
twistd = os.path.join(path, 'bin', 'twistd')
args = [twistd, '--pidfile=', '-noy', TAC_FILE_PATH]
- # run Users API on port 2424 without TLS
- env = {'DEBUG_SERVER': 'yes'}
-
- # allow passing of couch url using environment variable, used by gitlab
- # ci with docker
- couch_url = os.environ.get('SOLEDAD_COUCH_URL')
- if couch_url:
- env.update({'SOLEDAD_COUCH_URL': couch_url})
+ # Use a special environment when running twistd that allow passing of
+ # couch url using environment variable, used by gitlab ci with docker
+ env = {
+ 'DEBUG_SERVER': 'yes', # run Users API on port 2424 without TLS
+ 'SOLEDAD_COUCH_URL': self.couch_url, # used by gitlab ci
+ }
protocol = ProcessProtocol()
proc = reactor.spawnProcess(protocol, twistd, args, env=env)