mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 05:37:40 +03:00
26 lines
702 B
Nix
26 lines
702 B
Nix
# Test configuration switching.
|
|
|
|
import ./make-test.nix ({ pkgs, ...} : {
|
|
name = "switch-test";
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
maintainers = [ gleber ];
|
|
};
|
|
|
|
nodes = {
|
|
machine = { ... }: {
|
|
users.mutableUsers = false;
|
|
};
|
|
other = { ... }: {
|
|
users.mutableUsers = true;
|
|
};
|
|
};
|
|
|
|
testScript = {nodes, ...}: let
|
|
originalSystem = nodes.machine.config.system.build.toplevel;
|
|
otherSystem = nodes.other.config.system.build.toplevel;
|
|
in ''
|
|
$machine->succeed("env -i ${originalSystem}/bin/switch-to-configuration test | tee /dev/stderr");
|
|
$machine->succeed("env -i ${otherSystem}/bin/switch-to-configuration test | tee /dev/stderr");
|
|
'';
|
|
})
|