Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhooks: add tests #3469

Merged
merged 5 commits into from Jan 29, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Treat demo/test webhooks like demo/test tools.

- Populate test server with demo webhooks by default.
- Eliminate special logic needed to treat the demo directory differently.
- Document how to enable the demo webhooks in galaxy.ini.sample.
- Populate the demo webhooks when starting Galaxy with GALAXY_RUN_WITH_TEST_TOOLS=1 set.
  • Loading branch information...
jmchilton committed Jan 24, 2017
commit 867e8dc4ca9aa3055a0149de594bae8fab4f8d13
@@ -344,8 +344,9 @@ paste.app_factory = galaxy.web.buildapp:app_factory
# Webhooks directory: where to store webhooks - plugins to extend the Galaxy UI.
# By default none will be loaded. Set to config/plugins/webhooks/demo to load Galaxy's
# demo webhooks. To use an absolute path begin the path with '/'. This is a comma
# separated list.
# webhooks_dir = config/plugins/webhooks
# separated list. Add test/functional/webhooks to this list to include the demo webhooks
# used to test the webhook framework.
#webhooks_dir = config/plugins/webhooks

# Each job is given a unique empty directory as its current working directory.
# This option defines in what parent directory those directories will be
@@ -41,7 +41,7 @@ def __init__(self, webhooks_dirs):
for webhook_dir in config_directories_from_setting(webhooks_dirs):
for plugin_dir in os.listdir(webhook_dir):
path = os.path.join(webhook_dir, plugin_dir)
if os.path.isdir(path) and plugin_dir != 'demo':
if os.path.isdir(path):
self.webhooks_directories.append(path)

self.load_webhooks()
1 run.sh
@@ -81,6 +81,7 @@ then
export GALAXY_CONFIG_OVERRIDE_TOOL_CONFIG_FILE="test/functional/tools/samples_tool_conf.xml"
export GALAXY_CONFIG_ENABLE_BETA_WORKFLOW_MODULES="true"
export GALAXY_CONFIG_OVERRIDE_ENABLE_BETA_TOOL_FORMATS="true"
export GALAXY_CONFIG_OVERRIDE_WEBHOOKS_DIR="test/functional/webhooks"
fi

if [ -n "$GALAXY_UNIVERSE_CONFIG_DIR" ]; then
@@ -39,6 +39,7 @@
GALAXY_TEST_DIRECTORY = os.path.join(galaxy_root, "test")
GALAXY_TEST_FILE_DIR = "test-data,https://github.com/galaxyproject/galaxy-test-data.git"
TOOL_SHED_TEST_DATA = os.path.join(GALAXY_TEST_DIRECTORY, "shed_functional", "test_data")
TEST_WEBHOOKS_DIR = os.path.join(galaxy_root, "test", "functional", "webhooks")
FRAMEWORK_TOOLS_DIR = os.path.join(GALAXY_TEST_DIRECTORY, "functional", "tools")
FRAMEWORK_UPLOAD_TOOL_CONF = os.path.join(FRAMEWORK_TOOLS_DIR, "upload_tool_conf.xml")
FRAMEWORK_SAMPLE_TOOLS_CONF = os.path.join(FRAMEWORK_TOOLS_DIR, "samples_tool_conf.xml")
@@ -197,6 +198,7 @@ def setup_galaxy_config(
use_tasked_jobs=True,
use_heartbeat=False,
user_library_import_dir=user_library_import_dir,
webhooks_dir=TEST_WEBHOOKS_DIR,
)
config.update(database_conf(tmpdir))
config.update(install_database_conf(tmpdir, default_merged=default_install_db_merged))
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.