X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d3693bea252723f0cfd6dc6ea5c06347cfcb6cb3..c4107b1da872fe7df4c73de1a1d496bbfa1290dc:/sdk/python/tests/run_test_server.py diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py index 7b1f6059ae..79767c2fa5 100644 --- a/sdk/python/tests/run_test_server.py +++ b/sdk/python/tests/run_test_server.py @@ -413,14 +413,15 @@ def run_controller(): f.write(""" Clusters: zzzzz: + ManagementToken: e687950a23c3a9bceec28c6223a06c79 HTTPRequestTimeout: 30s PostgreSQL: ConnectionPool: 32 Connection: - host: {} - dbname: {} - user: {} - password: {} + Host: {} + DBName: {} + User: {} + Password: {} NodeProfiles: "*": "arvados-controller": @@ -582,6 +583,7 @@ def stop_keep(num_servers=2): def run_keep_proxy(): if 'ARVADOS_TEST_PROXY_SERVICES' in os.environ: + os.environ["ARVADOS_KEEP_SERVICES"] = "http://localhost:{}".format(_getport('keepproxy')) return stop_keep_proxy() @@ -631,6 +633,7 @@ def run_arv_git_httpd(): agh = subprocess.Popen( ['arv-git-httpd', '-repo-root='+gitdir+'/test', + '-management-token=e687950a23c3a9bceec28c6223a06c79', '-address=:'+str(gitport)], env=env, stdin=open('/dev/null'), stdout=logf, stderr=logf) with open(_pidfile('arv-git-httpd'), 'w') as f: @@ -656,6 +659,7 @@ def run_keep_web(): ['keep-web', '-allow-anonymous', '-attachment-only-host=download', + '-management-token=e687950a23c3a9bceec28c6223a06c79', '-listen=:'+str(keepwebport)], env=env, stdin=open('/dev/null'), stdout=logf, stderr=logf) with open(_pidfile('keep-web'), 'w') as f: @@ -738,7 +742,7 @@ def _getport(program): def _dbconfig(key): global _cached_db_config if not _cached_db_config: - _cached_db_config = yaml.load(open(os.path.join( + _cached_db_config = yaml.safe_load(open(os.path.join( SERVICES_SRC_DIR, 'api', 'config', 'database.yml'))) return _cached_db_config['test'][key] @@ -750,7 +754,7 @@ def _apiconfig(key): fullpath = os.path.join(SERVICES_SRC_DIR, 'api', 'config', f) if not required and not os.path.exists(fullpath): return {} - return yaml.load(fullpath) + return yaml.safe_load(fullpath) cdefault = _load('application.default.yml') csite = _load('application.yml', required=False) _cached_config = {} @@ -769,7 +773,7 @@ def fixture(fix): yaml_file = yaml_file[0:trim_index] except ValueError: pass - return yaml.load(yaml_file) + return yaml.safe_load(yaml_file) def auth_token(token_name): return fixture("api_client_authorizations")[token_name]["api_token"]