Skip to content
Snippets Groups Projects
Verified Commit a3836cd3 authored by Victor's avatar Victor
Browse files

[tests] fix server import

When importing server, couch_state will load itself against couch_db url
configured on server. This fails when running on Docker as couchdb is in
another node.
parent e121a921
Branches
Tags
1 merge request!29Bug/docker
...@@ -272,12 +272,14 @@ def _get_couch_state(): ...@@ -272,12 +272,14 @@ def _get_couch_state():
SoledadBackend.BATCH_SUPPORT = conf.get('batching', False) SoledadBackend.BATCH_SUPPORT = conf.get('batching', False)
return state return state
try:
_couch_state = _get_couch_state() _couch_state = _get_couch_state()
# a WSGI application that may be used by `twistd -web` # a WSGI application that may be used by `twistd -web`
application = GzipMiddleware( application = GzipMiddleware(
SoledadTokenAuthMiddleware(SoledadApp(_couch_state))) SoledadTokenAuthMiddleware(SoledadApp(_couch_state)))
except:
pass
# another WSGI application in which we bypass token auth middleware for ease of # another WSGI application in which we bypass token auth middleware for ease of
# mind while debugging in your local environment # mind while debugging in your local environment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment