Skip to content
Snippets Groups Projects
Unverified Commit 3a7c3ec2 authored by drebs's avatar drebs
Browse files

[test] avoid failing when there's no couch_url in environment variable

parent d74f27b7
Branches 8995-8996-8997
No related tags found
No related merge requests found
Pipeline #
...@@ -68,12 +68,14 @@ class TacServerTestCase(unittest.TestCase): ...@@ -68,12 +68,14 @@ class TacServerTestCase(unittest.TestCase):
twistd = os.path.join(path, 'bin', 'twistd') twistd = os.path.join(path, 'bin', 'twistd')
args = [twistd, '--pidfile=', '-noy', TAC_FILE_PATH] 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') couch_url = os.environ.get('SOLEDAD_COUCH_URL')
env = { if couch_url:
'DEBUG_SERVER': 'yes', # run Users API on port 2424 without TLS env.update({'SOLEDAD_COUCH_URL': couch_url})
'SOLEDAD_COUCH_URL': couch_url, # used by gitlab ci with docker
}
protocol = ProcessProtocol() protocol = ProcessProtocol()
proc = reactor.spawnProcess(protocol, twistd, args, env=env) proc = reactor.spawnProcess(protocol, twistd, args, env=env)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment