Skip to content

Commit

Permalink
add a test tool deleting output
Browse files Browse the repository at this point in the history
which should fail (galaxyproject#14206)
  • Loading branch information
bernt-matthias committed Jul 4, 2022
1 parent 52de57b commit 37b3225
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/functional/tools/samples_tool_conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@
<tool file="interactivetool_simple.xml" />
<tool file="interactivetool_two_entry_points.xml" />
<tool file="converter_target_datatype.xml" />

<tool file="tool_deleting_output.xml" />

<!-- Tools interesting only for building up test workflows. -->

Expand Down
31 changes: 31 additions & 0 deletions test/functional/tools/tool_deleting_output.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<tool id="tool_deleting_output" name="tool_deleting_output" version="0.1.0" license="AFL-3.0" profile="21.09">
<command><![CDATA[
rm '$out_file1' &&
exit $exit_code
]]></command>
<inputs>
<param name="exit_code" type="integer" value="0"/>
</inputs>
<outputs>
<data name="out_file1" format="txt" />
</outputs>
<tests>
<test expect_exit_code="0" expect_failure="true">
<param name="exit_code" value="0"/>
<!-- <output name="out_file1">
<assert_contents>
<has_size value="0"/>
</assert_contents>
</output> -->
</test>
<test expect_exit_code="1" expect_failure="true">
<param name="exit_code" value="1"/>
</test>
</tests>
<help><![CDATA[
This tool tests what happens if the underlying program removes the output data set,
it should fail independent of the exit code and the exit code should be correctly checked.
With outputs_to_working_directory this provoked https://github.com/galaxyproject/galaxy/issues/14206
]]></help>
</tool>
2 changes: 1 addition & 1 deletion test/integration/test_job_outputs_to_working_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ def handle_galaxy_config_kwds(cls, config):

instance = integration_util.integration_module_instance(JobOutputsToWorkingDirectoryIntegrationInstance)

test_tools = integration_util.integration_tool_runner(["output_format", "output_empty_work_dir", "collection_creates_pair_from_work_dir"])
test_tools = integration_util.integration_tool_runner(["output_format", "output_empty_work_dir", "collection_creates_pair_from_work_dir", "tool_deleting_output"])

0 comments on commit 37b3225

Please sign in to comment.