aboutsummaryrefslogtreecommitdiffstats
path: root/nix/test.nix
Commit message (Collapse)AuthorAgeFilesLines
* nix: the switch serves the views when there is something to servetv5 hours1-3/+46
| | | | | | | | | | | | | | enstate.service reruns on a switch when the schema changes. A unit of its own, enstate-switch.service, takes what waits otherwise: a submission in incomingDir, or one staged. switch-to-configuration restarts sysinit-reactivation.target on every switch, which starts it, and triggering conditions keep it from running when nothing waits. The check before a switch uses the new generation's enstate, schema and configuration, and runs on a host without enstate, too: its first switch's state can wait in incomingDir. Subtests of the VM test: staged under an unchanged schema, brought by the switch (without the warning the activation-restart-list gives); a waiting submission taken by the switch that needs it; one refused refusing it.
* enstate: --stage, a submission for the next generationtv8 hours1-0/+25
| | | | | | | | | | Plans against --schema, stores the snapshot under it, and puts no views in place and runs no reactions: the running generation goes on as it is, keeping what it has no slot for, and the switch (--migrate) brings the new views. The way to fill a required slot a generation adds before switching to it, and to bring a host's first state: with the new system's enstate, schema and configuration. Tests, and a subtest of the VM test that does so.
* nix: the package, a NixOS module, its VM testtv8 hours1-0/+119
The module makes the schema from options (/etc/enstate/schema.json), every slot its own view unless it says otherwise, and names the views' paths (read-only `path` options) for the services that read them. It configures none of them: a service whose LoadCredential= reads a view is ordered after the unit that puts the views in place, by itself. That unit runs --migrate at boot and when the schema changes; the check before a switch is --migrate --dry-run against the new schema. The test: a consumer with a LoadCredential= of its own; apply from a source list, rotate, switch across a rename and back, a switch refused, a reboot.