add a test for chroot store fallback behavior (probably more) #278

Open
opened 2024-05-07 03:16:55 +00:00 by qyriad · 0 comments
Owner

If /nix/var doesn't exist, and there's no daemon, then Lix falls back to a chroot store in the user's home directory. This behavior seemingly makes it possible to run Lix inside the derivation sandbox, as agenix does for its tests.

This could really use a regression test, and since that's going to have to be a NixOS VM test we should probably try to exercise as much of the store creation code as we can in it too

See also: #274, https://gerrit.lix.systems/c/lix/+/1050

If /nix/var doesn't exist, and there's no daemon, then Lix [falls back to a chroot store in the user's home directory](https://git.lix.systems/lix-project/lix/src/commit/241b9992fd2426c686d47e131a77650bd888d3f0/src/libstore/store-api.cc#L1428-L1449). This behavior seemingly makes it possible to run Lix inside the derivation sandbox, as [agenix does for its tests](https://github.com/ryantm/agenix/blob/24a7ea390564ccd5b39b7884f597cfc8d7f6f44e/pkgs/agenix.nix#L29). This could really use a regression test, and since that's going to have to be a NixOS VM test we should probably try to exercise as much of the store creation code as we can in it too See also: #274, https://gerrit.lix.systems/c/lix/+/1050
qyriad added the
testing
Area/store
labels 2024-05-07 03:16:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#278
No description provided.