Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download: Fix unintentional downloading of containers in test #2434

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

- Improved container image resolution and prioritization of http downloads over Docker URIs ([#2364](https://github.com/nf-core/tools/pull/2364)).
- Registries provided with `-l`/`--container-library` will be ignored for modules with explicit container registry specifications ([#2403](https://github.com/nf-core/tools/pull/2403)).
- Fix unintentional downloading of containers in test for the Tower download functionality. Bug reported by @adamrtalbot and @awgymer ([#2434](https://github.com/nf-core/tools/pull/2434)).

### Linting

Expand Down
8 changes: 2 additions & 6 deletions tests/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ def test_download_workflow_with_success(self, tmp_dir, mock_download_image, mock
# Test Download for Tower
#
@with_temporary_folder
def test_download_workflow_for_tower(self, tmp_dir):
@mock.patch("nf_core.download.DownloadWorkflow.get_singularity_images")
def test_download_workflow_for_tower(self, tmp_dir, _):
download_obj = DownloadWorkflow(
pipeline="nf-core/rnaseq",
revision=("3.7", "3.9"),
Expand Down Expand Up @@ -451,11 +452,6 @@ def test_download_workflow_for_tower(self, tmp_dir):

# download_obj.download_workflow_tower(location=tmp_dir) will run container image detection for all requested revisions
assert isinstance(download_obj.containers, list) and len(download_obj.containers) == 33
# manually test container image detection for 3.7 revision only
download_obj.containers = [] # empty container list for the test
download_obj.workflow_repo.checkout(download_obj.wf_sha["3.7"])
download_obj.find_container_images(download_obj.workflow_repo.access())
assert len(download_obj.containers) == 30 # 30 containers for 3.7
assert (
"https://depot.galaxyproject.org/singularity/bbmap:38.93--he522d1c_0" in download_obj.containers
) # direct definition
Expand Down
Loading