Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions planemo/commands/cmd_shed_serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@options.galaxy_run_options()
@options.galaxy_config_options()
@options.pid_file_option()
@options.daemon_option()
@click.option(
"--skip_dependencies",
is_flag=True,
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ universal = 1

[nosetests]
exclude=(planemo_ext|.*cwl2script.*)
verbosity=1
verbosity=6
detailed-errors=1
with-doctest=1
with-coverage=1
Expand Down
28 changes: 25 additions & 3 deletions tests/test_cmd_serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,32 @@ def test_serve_workflow(self):
"--extra_tools", cat,
]
self._launch_thread_and_wait(self._run, extra_args)
time.sleep(40)
time.sleep(30)
user_gi = self._user_gi
assert len(user_gi.histories.get_histories(name=TEST_HISTORY_NAME)) == 0
user_gi.histories.create_history(TEST_HISTORY_NAME)
assert user_gi.tools.get_tools(tool_id="random_lines1")
assert len(user_gi.workflows.get_workflows()) == 1

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_shed_serve(self):
extra_args = ["--daemon", "--pid_file", self._pid_file, "--shed_target", "toolshed"]
fastqc_path = os.path.join(TEST_REPOS_DIR, "fastqc")
self._serve_artifact = fastqc_path
self._launch_thread_and_wait(self._run_shed, extra_args)
user_gi = self._user_gi
found = False
tool_ids = None
for i in range(30):
tool_ids = [t["id"] for t in user_gi.tools.get_tools()]
if "toolshed.g2.bx.psu.edu/repos/devteam/fastqc/fastqc/0.71" in tool_ids:
found = True
break
time.sleep(5)

assert found, "Failed to find fastqc id in %s" % tool_ids
kill_pid_file(self._pid_file)

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_serve_profile(self):
self._test_serve_profile()
Expand Down Expand Up @@ -105,9 +124,12 @@ def _launch_thread_and_wait(self, func, args=[]):
time.sleep(1)
assert network_util.wait_net_service("127.0.0.1", port, timeout=600)

def _run(self, serve_args=[]):
def _run_shed(self, serve_args=[]):
return self._run(serve_args=serve_args, serve_cmd="shed_serve")

def _run(self, serve_args=[], serve_cmd="serve"):
test_cmd = [
"serve",
serve_cmd,
"--install_galaxy",
"--no_dependency_resolution",
"--port",
Expand Down
36 changes: 0 additions & 36 deletions tests/test_cmd_shed_serve.py

This file was deleted.

17 changes: 1 addition & 16 deletions tests/test_cmd_test_conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,6 @@ def test_conda_dependencies_implicit_resolution(self):
]
self._check_exit_code(test_command, exit_code=0)

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_conda_dependencies_verify_branch_testing_properly(self):
# This tries to test Conda dependency resolution with a pre-Conda Galaxy and
# expects a failure. This verifies the other test cases are in fact testing
# different versions of Galaxy as expected.
with self._isolate():
bwa_test = os.path.join(PROJECT_TEMPLATES_DIR, "conda_testing", "bwa.xml")
test_command = [
"--verbose",
"test",
"--galaxy_branch", "release_15.10",
bwa_test,
]
self._check_exit_code(test_command, exit_code=self.non_zero_exit_code)

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_conda_dependencies_version(self):
"""Test tool with wrong version and ensure it fails."""
Expand Down Expand Up @@ -90,7 +75,7 @@ def test_local_conda_dependencies_version(self):
self._check_exit_code(conda_install_command)
test_command = [
"test",
"--galaxy_branch", "release_17.01",
"--galaxy_branch", "release_17.09",
fleeqtk_tool,
]
self._check_exit_code(test_command)
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# TODO: py34 to envlist
# TODO: implement doc linting
[tox]
envlist = py{27,34}-lint, py{27,34}-quick, py27-lint-imports, py27-lint-docstrings, py27-lint-readme, py27-lint-docs, py{27,34,35}
envlist = py{27,34}-lint, py{27,34,35}-quick, py27-lint-imports, py27-lint-docstrings, py27-lint-readme, py27-lint-docs, py{27,34,35}
source_dir = planemo
test_dir = tests

Expand Down