TST: ria: Work around new git-annex check #5254
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
test_ria_git_remote.test_bare_git_version_{1,2} create a store with a
dataset and check git-annex operation with both the git remote and ora
special remote. As of git-annex's 75acf5f44 (improve some edge cases
around partial initialization, 2020-12-14) [1], the operations with
the git remote fail because git-annex has a safety check that aborts
when it encounters a repo that has an annex/objects/ directory but no
annex.version or annex.uuid configuration.
The annex/objects/ directory is created by create_ds_in_store(). This
works fine in the context of the create-sibling-ria command: the git
remote has annex-ignore set to true as the intention is for git-annex
to only operate with the store via the ora special remote. The above
tests, on the other hand, explicitly check git-annex operation on the
git remote.
The git-annex safety check, then, appears to be colliding with a
test-specific detail and shouldn't be an issue with real usage via the
ora special remote. Given this, update these tests to remove the
annex/objects/ directory after they call create_ds_in_store().
[1] https://git-annex.branchable.com/todo/avoid_autoinit_when_git-annex_branch_already_exists/
Fixes #5253.
I'm not too confident about my conclusion that this shouldn't affect normal operation. What do you think, @bpoldrack?