forked from mirrors/nixpkgs
nixos/nix-generate-config: port test to python
This commit is contained in:
parent
1afa50aef1
commit
16d2fccfd9
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ lib, ... } : {
|
||||
import ./make-test-python.nix ({ lib, ... } : {
|
||||
name = "nixos-generate-config";
|
||||
meta.maintainers = with lib.maintainers; [ basvandijk ];
|
||||
machine = {
|
||||
|
@ -11,14 +11,16 @@ import ./make-test.nix ({ lib, ... } : {
|
|||
'';
|
||||
};
|
||||
testScript = ''
|
||||
startAll;
|
||||
$machine->waitForUnit("multi-user.target");
|
||||
$machine->succeed("nixos-generate-config");
|
||||
start_all()
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.succeed("nixos-generate-config")
|
||||
|
||||
# Test if the configuration really is overridden
|
||||
$machine->succeed("grep 'OVERRIDDEN' /etc/nixos/configuration.nix");
|
||||
machine.succeed("grep 'OVERRIDDEN' /etc/nixos/configuration.nix")
|
||||
|
||||
# Test of if the Perl variable $bootLoaderConfig is spliced correctly:
|
||||
$machine->succeed("grep 'boot\\.loader\\.grub\\.enable = true;' /etc/nixos/configuration.nix");
|
||||
machine.succeed(
|
||||
"grep 'boot\\.loader\\.grub\\.enable = true;' /etc/nixos/configuration.nix"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue