Skip to content

Conversation

pks-gitlab
Copy link

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.

@pks-gitlab pks-gitlab force-pushed the pks-test-fixes-for-reftables branch from 754ca11 to 60e21fb Compare August 1, 2025 06:25
@pks-t pks-t mentioned this pull request Aug 1, 2025
@pks-gitlab pks-gitlab mentioned this pull request Aug 4, 2025
pks-t added 4 commits August 4, 2025 16:33
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.
@pks-gitlab pks-gitlab force-pushed the pks-test-fixes-for-reftables branch from 60e21fb to f1321c9 Compare August 4, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants