From: Tom Clegg Date: Thu, 12 Feb 2015 22:42:16 +0000 (-0500) Subject: 5200: Do not fail tests if application.yml is missing: defaults are enough to pass... X-Git-Tag: 1.1.0~1810^2~2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/398a5ef03226f2f3ba06b6ad05a61f3a4b403cf7?hp=820ce7ad92cba95587800a275e14bbf24670898f 5200: Do not fail tests if application.yml is missing: defaults are enough to pass tests. --- diff --git a/sdk/python/tests/test_arv_put.py b/sdk/python/tests/test_arv_put.py index 196264f766..41fa8cfb66 100644 --- a/sdk/python/tests/test_arv_put.py +++ b/sdk/python/tests/test_arv_put.py @@ -399,9 +399,13 @@ class ArvadosPutTest(run_test_server.TestCaseWithServers, ArvadosBaseTestCase): class ArvPutIntegrationTest(run_test_server.TestCaseWithServers, ArvadosBaseTestCase): def _getKeepServerConfig(): - for config_file in ['application.yml', 'application.default.yml']: - with open(os.path.join(run_test_server.SERVICES_SRC_DIR, - "api", "config", config_file)) as f: + for config_file, mandatory in [ + ['application.yml', True], ['application.default.yml', False]]: + path = os.path.join(run_test_server.SERVICES_SRC_DIR, + "api", "config", config_file) + if not mandatory and not os.path.exists(path): + continue + with open(path) as f: rails_config = yaml.load(f.read()) for config_section in ['test', 'common']: try: