From 398a5ef03226f2f3ba06b6ad05a61f3a4b403cf7 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Thu, 12 Feb 2015 17:42:16 -0500 Subject: [PATCH] 5200: Do not fail tests if application.yml is missing: defaults are enough to pass tests. --- sdk/python/tests/test_arv_put.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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: -- 2.30.2