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";
|
name = "nixos-generate-config";
|
||||||
meta.maintainers = with lib.maintainers; [ basvandijk ];
|
meta.maintainers = with lib.maintainers; [ basvandijk ];
|
||||||
machine = {
|
machine = {
|
||||||
|
@ -11,14 +11,16 @@ import ./make-test.nix ({ lib, ... } : {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
testScript = ''
|
testScript = ''
|
||||||
startAll;
|
start_all()
|
||||||
$machine->waitForUnit("multi-user.target");
|
machine.wait_for_unit("multi-user.target")
|
||||||
$machine->succeed("nixos-generate-config");
|
machine.succeed("nixos-generate-config")
|
||||||
|
|
||||||
# Test if the configuration really is overridden
|
# 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:
|
# 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