aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-12 02:15:26 +0000
committertv <tv@krebsco.de>2026-11-12 02:15:26 +0000
commitd4c352a402aec1682625144c0440ca31c232ee74 (patch)
tree898da22caf12a75227fe517c6f7330ffa840b032 /README.md
parent1c7621261c4e9df8d572aef5eb6369d20eea23aa (diff)
tests: add edge cases of flakes
A new test, edge-cases, covers paths that work but have no scenario yet: a flake given by an indirect reference, which the target fetches by its locked reference; a remote flake in a subdirectory; a flake in a subdirectory drawing inputs from sources; a dirty Git work tree; a flake whose lock file needs updating; drawing inputs from a source that isn't a directory; nested names of missing inputs; several sources sharing one flake; and an input locked to a path that the target has. The deploying machine gets a registry entry for the indirect reference. Resolving it fails if the global registry can't be downloaded, which it can't in the VM, and disabling the global registry with flake-registry needs flakes, so the deploying machine enables them, like any deploying machine using indirect references does. The target doesn't, so checks for flake support on targets still mean something.
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/README.md b/README.md
index 35788cd..e6a8981 100644
--- a/README.md
+++ b/README.md
@@ -576,11 +576,13 @@ flakes, as long as the inputs drawing from them are declared with
## Tests
-`tests/` contains NixOS VM tests for populate: one test per source type, and
-one for features spanning sources, such as flake inputs from sources. Each
-test deploys every combination of a source type's options to the deploying
-machine itself, to a remote target as `root`, and to a remote target using
-`sudo`, and checks the result after deploying and after deploying again.
+`tests/` contains NixOS VM tests for populate: one test per source type, one
+for features spanning sources, such as flake inputs from sources, one for edge
+cases of flakes, such as unusual lock files, and one for the arguments
+`writeDeploy` passes to `nixos-rebuild`. The tests deploy every combination
+of a source type's options to the deploying machine itself, to a remote target
+as `root`, and to a remote target using `sudo`, and check the result after
+deploying and after deploying again.
The tests require KVM and nixpkgs with `pkgs.testers.runNixOSTest`
(23.05 or later), and use `<nixpkgs>` by default.