Files
galaxy/test/functional/tools/expect_failure_invalid_inputs.xml
John ChiltonandClaude Opus 5.5 9802df374f Let expect_failure tests supply invalid parameter values
Profile >= 24.2 tools validate test inputs on load, so an expect_failure
test exercising a validator became an error test and never ran (#22794).
Tests expecting failure now skip value validation - Galaxy rejects the
submission, static and dynamic validators alike - while unknown
parameter names are still errors. YAML tests may also omit outputs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 20:14:23 -04:00

31 lines
1.1 KiB
XML

<tool id="expect_failure_invalid_inputs" name="expect_failure_invalid_inputs" version="0.1.0" profile="24.2">
<description>test declaring inputs that fail parameter validation</description>
<command><![CDATA[
echo '$taxid' > '$output'
]]></command>
<inputs>
<param name="taxid" type="text" value="1" label="Taxonomic ID(s)">
<validator type="regex" message="Enter a space-separated list of numeric tax IDs">^\d+[\d ]*$</validator>
</param>
</inputs>
<outputs>
<data format="txt" name="output"/>
</outputs>
<tests>
<test>
<param name="taxid" value="10386 11176"/>
<output name="output">
<assert_contents>
<has_line line="10386 11176"/>
</assert_contents>
</output>
</test>
<!-- the regex validator rejects this value, so the job is never created -->
<test expect_failure="true">
<param name="taxid" value="10386 f5"/>
</test>
</tests>
<help>
</help>
</tool>