Skip to content

Commit

Permalink
Add tool test for discovered dataset metadata from galaxy.json.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Aug 4, 2016
1 parent 1fab4df commit 76e84eb
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/functional/tools/samples_tool_conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<tool file="multi_output_configured.xml" />
<tool file="multi_output_assign_primary.xml" />
<tool file="tool_provided_metadata_1.xml" />
<tool file="tool_provided_metadata_2.xml" />
<tool file="inputs_as_json.xml" />
<tool file="dbkey_filter_input.xml" />
<tool file="dbkey_filter_multi_input.xml" />
Expand Down
40 changes: 40 additions & 0 deletions test/functional/tools/tool_provided_metadata_2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<tool id="tool_provided_metadata_2" name="tool_provided_metadata_2">
<command>
echo "Log" > $sample;
echo "1" > sample1.report.tsv;
echo "2" > sample2.report.tsv;
cp $c1 galaxy.json;
</command>
<configfiles>
<configfile name="c1">{"type": "new_primary_dataset", "filename": "sample1.report.tsv", "name": "cool name 1", "ext": "txt", "info": "cool 1 info", "dbkey": "hg19"}
{"type": "new_primary_dataset", "filename": "sample2.report.tsv", "name": "cool name 2", "ext": "txt", "info": "cool 2 info", "dbkey": "hg19"}
</configfile>
</configfiles>
<inputs>
<param name="input" type="data" />
</inputs>
<outputs>
<data name="sample">
<discover_datasets pattern="(?P&lt;designation&gt;.+)\.report\.tsv" visible="true" />
</data>
</outputs>
<tests>
<test>
<param name="input" ftype="txt" value="simple_line.txt"/>
<output name="sample">
<assert_contents><has_text text="Log" /></assert_contents>
<discovered_dataset designation="sample1" ftype="txt">
<assert_contents><has_line line="1" /></assert_contents>
<metadata name="name" value="cool name 1" />
<metadata name="dbkey" value="hg19" />
<metadata name="info" value="cool 1 info" />
</discovered_dataset>
<discovered_dataset designation="sample2" ftype="txt">
<assert_contents><has_line line="2" /></assert_contents>
<metadata name="name" value="cool name 2" />
<metadata name="info" value="cool 2 info" />
</discovered_dataset>
</output>
</test>
</tests>
</tool>

0 comments on commit 76e84eb

Please sign in to comment.