1# Test configuration switching.
2
3import ./make-test.nix ({ pkgs, ...} : {
4 name = "switch-test";
5 meta = with pkgs.stdenv.lib.maintainers; {
6 maintainers = [ gleber ];
7 };
8
9 nodes = {
10 machine = { ... }: {
11 users.mutableUsers = false;
12 };
13 other = { ... }: {
14 users.mutableUsers = true;
15 };
16 };
17
18 testScript = {nodes, ...}: let
19 originalSystem = nodes.machine.config.system.build.toplevel;
20 otherSystem = nodes.other.config.system.build.toplevel;
21 in ''
22 $machine->succeed("env -i ${originalSystem}/bin/switch-to-configuration test | tee /dev/stderr");
23 $machine->succeed("env -i ${otherSystem}/bin/switch-to-configuration test | tee /dev/stderr");
24 '';
25})