Files
galaxy/test/functional/tools/async_conditional_no_default_nested_data.xml
T
mvdbeek 4f21ff4793 Add async submission regression tests and reproducer tools
Add unit regression tests in test_parameter_test_cases.py covering the
two resolution fixes: an unqualified repeat nested inside a conditional
(single and double nesting) and a conditional discriminator with the
conditional name elided inside a section.

Add two framework test tools modelling the genuine async-submission
regressions found by running unmodified upstream tools (deseq2, gatk4,
hisat2) under both submission paths:
- async_conditional_no_default_nested_data.xml: green in sync and async
  (guards the repeat-in-conditional fix).
- async_ambiguous_unqualified_name.xml: reproduces the still-open
  "ambiguous unqualified test parameter name" failure (a test that lists
  the same unqualified param twice). Listed in
  TOOLS_THAT_ARE_OUTSTANDING_ISSUES until that is surfaced as a
  TestCaseValidationError and the affected tool tests are fixed.
2026-06-15 15:16:40 +02:00

55 lines
2.3 KiB
XML

<tool id="async_conditional_no_default_nested_data" name="async_conditional_no_default_nested_data" version="1.0.0" profile="22.01">
<description>async regression: omitted discriminator of a default-less conditional + nested required data param</description>
<!--
Models deseq2 select_data: a conditional whose discriminator (`how`) has NO
selected="true" default, containing a repeat with a REQUIRED data param.
The test omits `how` and supplies the repeat unqualified (legacy access).
Sync (POST /api/tools): an omitted discriminator selects the FIRST when
(datasets_per_level); the unqualified repeat is mapped into it; job runs.
Async (POST tool request, GALAXY_TEST_USE_LEGACY_TOOL_API=if_needed): the
missing discriminator resolves to a phantom "__absent__" branch, so the
nested required `countsFile` is reported missing and request validation
fails:
select_data.__absent__.rep_level.0.countsFile - Field required
-->
<command><![CDATA[
#for $lvl in $select_data.rep_level:
cat '$lvl.countsFile' >> '$out_file1' &&
#end for
echo "done" >> '$out_file1'
]]></command>
<inputs>
<conditional name="select_data">
<param name="how" type="select" label="How">
<option value="datasets_per_level">Datasets per level</option>
<option value="group_tags">Group tags</option>
</param>
<when value="datasets_per_level">
<repeat name="rep_level" title="Level" min="1">
<param name="countsFile" type="data" format="txt" label="Counts file" />
</repeat>
</when>
<when value="group_tags">
<param name="countsFile" type="data" format="txt" label="Counts file" />
</when>
</conditional>
</inputs>
<outputs>
<data name="out_file1" format="txt" />
</outputs>
<tests>
<test>
<repeat name="rep_level">
<param name="countsFile" value="simple_line.txt" />
</repeat>
<output name="out_file1">
<assert_contents>
<has_text text="done" />
</assert_contents>
</output>
</test>
</tests>
</tool>