I am currently trying to write tests for a tool that I am publishing, that creates a list of zip files that are contained within a collection. As the number of zip files is not known in advance, I am using the “discover_datasets“ tag:
<collection type='list' label='Influx_si input files' name='list_output'>
<discover_datasets pattern='(?P<name>.+\.[^.]+)$' format='zip'/>
</collection>
I have no problem getting this to work when I serve the tool on a local instance. The problem comes when I write the test and I try it out using “planemo test“. Here is the test of the collection:
<output_collection name='list_output' type='list'>
<element name='Sample_1' file='Sample_1.zip' ftype='zip'>
<assert_contents>
<has_archive_member path='Sample_1.miso'>
<has_text_matching expression='sample\tId\tComment\tSpecie\tFragment\tDataset\tIsospecies\tSD\tTime'/>
<has_n_lines n='30'/>
</has_archive_member>
<has_archive_member path='Sample_1.mflux'>
<has_text_matching expression='Id\tComment\tFlux\tValue\tSD'/>
<has_text_matching expression='Glc_q'/>
<has_n_lines n='4'/>
</has_archive_member>
<has_archive_member path='Sample_1.netw'>
<has_n_lines n='86'/>
</has_archive_member>
<has_archive_member path='Sample_1.tvar'/>
<has_archive_member path='Sample_1.linp'/>
<has_archive_member path='Sample_1.cnstr'/>
<has_archive_member path='Sample_1.opt'/>
</assert_contents>
</element>
This does not work as I get this simple error message showing that the collection is not being detected I think by planemo:
Output collection 'list_output': failed to find identifier 'Sample_1' in the tool generated elements ['conda_activate.log']
Any ideas on how I can fix this?
Thanks!!