Test fixes to prepare for the reftable backend#7113
Open
pks-gitlab wants to merge 4 commits intolibgit2:mainfrom
Open
Test fixes to prepare for the reftable backend#7113pks-gitlab wants to merge 4 commits intolibgit2:mainfrom
pks-gitlab wants to merge 4 commits intolibgit2:mainfrom
Conversation
754ca11 to
60e21fb
Compare
Closed
60e21fb to
f1321c9
Compare
Introduce a function that reads the "refStorage" extension so that we can easily figure out whether a specific repository uses the "files" or any other reference format. While we don't support other formats yet, we are about to add support for the "reftable" format.
There are a bunch of tests where we read or write references via the filesystem directly. This only works with the "files" backend, but naturally breaks if we supported any other reference format. Refactor these tests to instead use the refdb to access those.
When testing conditional includes we overwrite the repository's config file with the relevant conditions. This causes us to fully overwrite all repository configuration, including the repository format version and any extensions. While the test repository used in this test does not have any extensions, we will add a reftable-enabled repository that does rely on the "refStorage" extension eventually. Fix this by only modifying the relevant config keys.
We have a bunch of checks for properties of the "files" reference
backend:
- Whether a specific reference has been packed or whether it still
exists as a loose reference.
- Whether empty ref directories get pruned.
- Whether we properly fsync data to disk.
These checks continue to be sensible for that backend, but for any other
backend they plain don't work. Adapt the tests so that we only run them
in case the repository uses the "files" backend.
f1321c9 to
9e3b60a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request includes a couple of test fixes required for reftables. I've split them out so that the final PR for reftable support becomes smaller.