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

test: Adjust testremote for expected failure amount #324

Merged
merged 1 commit into from
Sep 13, 2024
Merged
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
11 changes: 8 additions & 3 deletions datalad_dataverse/tests/test_remote.py
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@

from datalad.api import clone

from datalad_next.exceptions import CommandError
from datalad_next.utils import (
on_windows,
rmtree,
@@ -78,9 +79,13 @@ def test_remote(dataverse_admin_credential_setup,
'drop', '--from', 'mydv', 'somefile.txt',
])
# run git-annex own testsuite
ds.repo.call_annex([
'testremote', '--fast', 'mydv',
])
# since Dataverse version 5.0, "storeKey when already present" will
# fail, as Dataverse forbids replacing files with identical names and
# checksums: https://guides.dataverse.org/en/latest/user/dataset-management.html#duplicate-files
with pytest.raises(CommandError, match='4 out of 125 tests failed'):
ds.repo.call_annex([
'testremote', '--fast', 'mydv',
])


def test_datalad_annex(dataverse_admin_credential_setup,