[ARVADOS] created: ef59af830e065084915237278c1fbdafceb836ba

Git user git at public.curoverse.com
Fri Sep 22 16:32:44 EDT 2017


        at  ef59af830e065084915237278c1fbdafceb836ba (commit)


commit ef59af830e065084915237278c1fbdafceb836ba
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Fri Sep 22 16:31:46 2017 -0400

    Use configured postgres port in arvados-ws config in tests.
    
    No issue #
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index 57efb97..7adce69 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -407,6 +407,7 @@ Listen: :{}
 LogLevel: {}
 Postgres:
   host: {}
+  port: {}
   dbname: {}
   user: {}
   password: {}
@@ -415,6 +416,7 @@ Postgres:
                    port,
                    ('info' if os.environ.get('ARVADOS_DEBUG', '') in ['','0'] else 'debug'),
                    _dbconfig('host'),
+                   _dbconfig('port', 5432),
                    _dbconfig('database'),
                    _dbconfig('username'),
                    _dbconfig('password')))
@@ -670,12 +672,12 @@ def _getport(program):
     except IOError:
         return 9
 
-def _dbconfig(key):
+def _dbconfig(key, *args):
     global _cached_db_config
     if not _cached_db_config:
         _cached_db_config = yaml.load(open(os.path.join(
             SERVICES_SRC_DIR, 'api', 'config', 'database.yml')))
-    return _cached_db_config['test'][key]
+    return _cached_db_config['test'].get(key, *args)
 
 def _apiconfig(key):
     global _cached_config

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list