From 5b826a0839f6545ee94b3c3cd3ff710e5b8747f3 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 28 Mar 2016 17:08:46 -0400 Subject: [PATCH] Move more galaxy config logic into driver_util. This time for galaxy master API key. --- scripts/functional_tests.py | 9 +++------ test/base/driver_util.py | 3 +++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/functional_tests.py b/scripts/functional_tests.py index 4594828e7b3..dce11d70160 100644 --- a/scripts/functional_tests.py +++ b/scripts/functional_tests.py @@ -71,8 +71,6 @@ def main(): # For storing Data Manager outputs and .loc files so that real ones don't get clobbered data_manager_test_tmp_path = tempfile.mkdtemp( prefix='data_manager_test_tmp', dir=galaxy_test_tmp_dir ) galaxy_data_manager_data_path = tempfile.mkdtemp( prefix='data_manager_tool-data', dir=data_manager_test_tmp_path ) - master_api_key = get_master_api_key() - app = None server_wrapper = None @@ -82,7 +80,6 @@ def main(): tool_config_file=tool_config_file, galaxy_data_manager_data_path=galaxy_data_manager_data_path, update_integrated_tool_panel=False, - master_api_key=master_api_key, cleanup_job='onsuccess', enable_beta_tool_formats=True, auto_configure_logging=logging_config_file is None, @@ -113,7 +110,7 @@ def main(): if workflow_test: import functional.workflow functional.workflow.WorkflowTestCase.workflow_test_file = workflow_test - functional.workflow.WorkflowTestCase.master_api_key = master_api_key + functional.workflow.WorkflowTestCase.master_api_key = get_master_api_key() functional.workflow.WorkflowTestCase.user_api_key = get_user_api_key() data_manager_test = _check_arg( '-data_managers', param=False ) if data_manager_test: @@ -122,7 +119,7 @@ def main(): functional.test_data_managers.build_tests( tmp_dir=data_manager_test_tmp_path, testing_shed_tools=testing_shed_tools, - master_api_key=master_api_key, + master_api_key=get_master_api_key(), user_api_key=get_user_api_key(), ) @@ -136,7 +133,7 @@ def main(): functional.test_toolbox.build_tests( app=app, testing_shed_tools=testing_shed_tools, - master_api_key=master_api_key, + master_api_key=get_master_api_key(), user_api_key=get_user_api_key(), ) success = driver_util.nose_config_and_run() diff --git a/test/base/driver_util.py b/test/base/driver_util.py index f11183ba201..7d80a8a7806 100644 --- a/test/base/driver_util.py +++ b/test/base/driver_util.py @@ -22,6 +22,7 @@ import nose.plugins.manager from paste import httpserver +from .api_util import get_master_api_key from .tool_shed_util import parse_tool_panel_config from .nose_util import run from .instrument import StructuredTestDataPlugin @@ -113,6 +114,7 @@ def setup_galaxy_config( if tool_dependency_dir is None: tool_dependency_dir = tempfile.mkdtemp(dir=tmpdir, prefix="tool_dependencies") tool_data_table_config_path = _tool_data_table_config_path(default_tool_data_table_config_path) + master_api_key = get_master_api_key() config = dict( admin_users='test@bx.psu.edu', allow_library_path_paste=True, @@ -127,6 +129,7 @@ def setup_galaxy_config( library_import_dir=library_import_dir, log_destination="stdout", new_file_path=new_file_path, + master_api_key=master_api_key, running_functional_tests=True, template_cache_path=template_cache_path, template_path='templates',