summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/server/test_tac.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/server/test_tac.py b/tests/server/test_tac.py
index 1ebe3308..7f52481c 100644
--- a/tests/server/test_tac.py
+++ b/tests/server/test_tac.py
@@ -68,12 +68,14 @@ class TacServerTestCase(unittest.TestCase):
twistd = os.path.join(path, 'bin', 'twistd')
args = [twistd, '--pidfile=', '-noy', TAC_FILE_PATH]
- # Use a special environment when running twistd.
+ # 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')
- env = {
- 'DEBUG_SERVER': 'yes', # run Users API on port 2424 without TLS
- 'SOLEDAD_COUCH_URL': couch_url, # used by gitlab ci with docker
- }
+ if couch_url:
+ env.update({'SOLEDAD_COUCH_URL': couch_url})
protocol = ProcessProtocol()
proc = reactor.spawnProcess(protocol, twistd, args, env=env)