Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
needs to be the same hash in all places and independent of given/absent
build in the version.
  • Loading branch information
bernt-matthias committed Jul 19, 2024
1 parent 3e92f0b commit 1c0354c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/galaxy/tool_util/deps/mulled/mulled_build_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@

def _mulled_build_tool(tool, args):
"""
test verifies that the v2 hashes are the identical with and without using a build in the versions
>>> import doctest
>>> doctest.ELLIPSIS_MARKER = '-ignore-'
>>> import argparse
>>> _mulled_build_tool("test/functional/tools/mulled_example_multi_1.xml", argparse.Namespace(dry_run=True, base_image="does-not-matter-here-but-test-is-fast", command="build", verbose=True, involucro_path="./involucro")) # doctest: +ELLIPSIS
-ignore- TARGETS=samtools=1.3.1,bedtools=2.26.0 -ignore- REPO=quay.io/biocontainers/mulled-v2-8186960447c5cb2faa697666dc1e6d919ad23f3e:a6419f25efff953fc505dbd5ee734856180bb619-0 -ignore-
>>> _mulled_build_tool("test/functional/tools/mulled_example_multi_2.xml", argparse.Namespace(dry_run=True, base_image="does-not-matter-here-but-test-is-fast", command="build", verbose=True, involucro_path="./involucro")) # doctest: +ELLIPSIS
-ignore- TARGETS=samtools=1.3.1=h9071d68_10,bedtools=2.26.0=0 -ignore- REPO=quay.io/biocontainers/mulled-v2-8186960447c5cb2faa697666dc1e6d919ad23f3e:8e86df67d257ce6494ae12b2c60e1b94025ea529-0 -ignore-
-ignore- TARGETS=samtools=1.3.1=h9071d68_10,bedtools=2.26.0=0 -ignore- REPO=quay.io/biocontainers/mulled-v2-8186960447c5cb2faa697666dc1e6d919ad23f3e:a6419f25efff953fc505dbd5ee734856180bb619-0 -ignore-
"""
tool_source = get_tool_source(tool)
requirements, *_ = tool_source.parse_requirements_and_containers()
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tool_util/deps/mulled/mulled_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _mulled_hash(hash, targets):
>>> _mulled_hash(hash="v2", targets="samtools=1.3.1,bedtools=2.26.0")
'mulled-v2-8186960447c5cb2faa697666dc1e6d919ad23f3e:a6419f25efff953fc505dbd5ee734856180bb619'
>>> _mulled_hash(hash="v2", targets="samtools=1.3.1=h9071d68_10,bedtools=2.26.0=0")
'mulled-v2-8186960447c5cb2faa697666dc1e6d919ad23f3e:8e86df67d257ce6494ae12b2c60e1b94025ea529'
'mulled-v2-8186960447c5cb2faa697666dc1e6d919ad23f3e:a6419f25efff953fc505dbd5ee734856180bb619'
"""
targets = target_str_to_targets(targets)
image_name = v2_image_name if hash == "v2" else v1_image_name
Expand Down
2 changes: 1 addition & 1 deletion test/integration/test_container_resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ class MulledTestCase:

class MulledTestCaseWithBuildInfo:
tool_id = "mulled_example_multi_2"
mulled_hash = "mulled-v2-8186960447c5cb2faa697666dc1e6d919ad23f3e:8e86df67d257ce6494ae12b2c60e1b94025ea529-0"
mulled_hash = "mulled-v2-8186960447c5cb2faa697666dc1e6d919ad23f3e:a6419f25efff953fc505dbd5ee734856180bb619-0"


class TestDefaultContainerResolvers(DockerContainerResolverTestCase, ContainerResolverTestCases, MulledTestCase):
Expand Down

0 comments on commit 1c0354c

Please sign in to comment.