From 59a2d537f3450407aa48e32645d92a5246c046fe Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 24 Jul 2019 16:25:06 -0400 Subject: [PATCH] 14717: Delete obsolete functions from run_test_server.py Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- sdk/python/tests/run_test_server.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py index 987c67303f..b073eff40d 100644 --- a/sdk/python/tests/run_test_server.py +++ b/sdk/python/tests/run_test_server.py @@ -758,35 +758,6 @@ def stop_nginx(): def _pidfile(program): return os.path.join(TEST_TMPDIR, program + '.pid') -def _dbconfig(key): - global _cached_db_config - if not _cached_db_config: - if "ARVADOS_CONFIG" in os.environ: - _cached_db_config = list(yaml.safe_load(open(os.environ["ARVADOS_CONFIG"]))["Clusters"].values())[0]["PostgreSQL"]["Connection"] - else: - _cached_db_config = yaml.safe_load(open(os.path.join( - SERVICES_SRC_DIR, 'api', 'config', 'database.yml')))["test"] - _cached_db_config["dbname"] = _cached_db_config["database"] - _cached_db_config["user"] = _cached_db_config["username"] - return _cached_db_config[key] - -def _apiconfig(key): - global _cached_config - if _cached_config: - return _cached_config[key] - def _load(f, required=True): - fullpath = os.path.join(SERVICES_SRC_DIR, 'api', 'config', f) - if not required and not os.path.exists(fullpath): - return {} - return yaml.safe_load(fullpath) - cdefault = _load('application.default.yml') - csite = _load('application.yml', required=False) - _cached_config = {} - for section in [cdefault.get('common',{}), cdefault.get('test',{}), - csite.get('common',{}), csite.get('test',{})]: - _cached_config.update(section) - return _cached_config[key] - def fixture(fix): '''load a fixture yaml file''' with open(os.path.join(SERVICES_SRC_DIR, 'api', "test", "fixtures", -- 2.30.2