Force container image names to lower case to satisfy Docker

This commit is contained in:
Nuwan Goonasekera
2020-05-07 01:52:40 +05:30
parent 5f69bbc431
commit 65476e6e32
4 changed files with 33 additions and 1 deletions
+2 -1
View File
@@ -166,7 +166,8 @@ class ContainerDescription(object):
resolve_dependencies=DEFAULT_CONTAINER_RESOLVE_DEPENDENCIES,
shell=DEFAULT_CONTAINER_SHELL,
):
self.identifier = identifier
# Force to lowercase because container image names must be lowercase
self.identifier = identifier.lower() if identifier else None
self.type = type
self.resolve_dependencies = resolve_dependencies
self.shell = shell
@@ -0,0 +1,24 @@
<!-- Containers with upper case names should be coerced to lower case as docker/singularity
do not accept mixed case image names -->
<tool id="mulled_example_invalid_case" name="mulled_example_invalid_case" version="0.1.0">
<requirements>
<requirement type="package" version="0.7.15">bwa</requirement>
<container type="docker">quay.io/biocontainers/BwA:0.7.15--0</container>
</requirements>
<stdio>
<exit_code range="2:" />
</stdio>
<command><![CDATA[
bwa > $output_1 2>&1
]]></command>
<inputs>
</inputs>
<outputs>
<data name="output_1" />
</outputs>
<help><![CDATA[
TODO: Fill in help.
]]></help>
<tests>
</tests>
</tool>
@@ -202,6 +202,7 @@
<tool file="mulled_example_conflict.xml" />
<tool file="mulled_example_simple.xml" />
<tool file="mulled_example_explicit.xml" />
<tool file="mulled_example_invalid_case.xml" />
<tool file="mulled_example_broken_no_requirements.xml" />
<tool file="simple_constructs.yml" />
@@ -30,6 +30,12 @@ class MulledJobTestCases(object):
output = self.dataset_populator.get_history_dataset_content(self.history_id, timeout=EXTENDED_TIMEOUT)
assert "0.7.15-r1140" in output
def test_mulled_explicit_invalid_case(self):
self.dataset_populator.run_tool("mulled_example_invalid_case", {}, self.history_id)
self.dataset_populator.wait_for_history(self.history_id, assert_ok=True)
output = self.dataset_populator.get_history_dataset_content(self.history_id, timeout=EXTENDED_TIMEOUT)
assert "0.7.15-r1140" in output
class ContainerizedIntegrationTestCase(integration_util.IntegrationTestCase):