Files
John ChiltonandClaude Opus 4.6 af38460325 Add API tests for format2-to-native conversion artifacts
Verify Galaxy correctly executes workflows whose tool_state contains representation differences from schema-unaware gxformat2 conversion.

Workflow tests cover list-form multiple selects, absent all-None sections, absent empty repeats with and without corrections, a safe-template empty repeat, lowercase JSON booleans, and connection-only section omission. Test data lives in wf_conversion/ with frozen native .ga snapshots and available format2 sources.

Tool execution tests cover explicit empty repeat, absent repeat, repeat instances, and list-form multiple select handling across legacy, 21.01, and request input formats.

Duplication check:

- No exact existing Galaxy test already imports native .ga workflows with gxformat2 conversion-artifact tool_state and executes them.

- Multiple-select coverage is adjacent to existing multi_select workflow/tool tests, but those use normal format2/tool execution paths rather than list-encoded native workflow tool_state.

- Boolean coverage is adjacent to gx_boolean tool tests for JSON booleans, but those do not cover native workflow execution from converted .ga tool_state.

- Repeat coverage is adjacent to existing repeat tools and API tests, but existing tests either require instances, index the first repeat item, or cover min-filled repeats; they do not cover omitted repeat keys in native workflow tool_state.

- The two absent-empty-repeat workflow tests intentionally overlap except for allow_tool_state_corrections, documenting that the flag does not change the current failure mode.

- The connection-only section test is not duplicated elsewhere; it covers omitted section state resolved through input_connections.

The empty_repeat_optional fixture is documented as native-only because wf_tool_state does not contain a companion format2 source.

(cherry picked from commit ef93b9f6bcfe9686069b9af2c9efadc9501a1d35)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-07-15 13:33:56 -04:00

27 lines
763 B
XML

<tool id="gx_repeat_optional" name="gx_repeat_optional" version="1.0.0">
<command><![CDATA[
#set $repeat_length = len($parameter)
echo 'length: $repeat_length' >> '$output'
#for $item in $parameter
echo '$item.text_parameter' >> '$output'
#end for
]]></command>
<inputs>
<repeat name="parameter" title="Repeat Parameter">
<param name="text_parameter" type="text" value="default_val" />
</repeat>
</inputs>
<outputs>
<data name="output" format="txt" />
</outputs>
<tests>
<test>
<output name="output">
<assert_contents>
<has_text text="length: 0" />
</assert_contents>
</output>
</test>
</tests>
</tool>