mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge pull request #137484 from i-do-cpp/add-disableInstallerTools-test
installers/tools: add test for system.disableInstallerTools option
This commit is contained in:
commit
f023c47101
2 changed files with 30 additions and 0 deletions
|
@ -98,6 +98,7 @@ in
|
|||
deluge = handleTest ./deluge.nix {};
|
||||
dendrite = handleTest ./dendrite.nix {};
|
||||
dhparams = handleTest ./dhparams.nix {};
|
||||
disable-installer-tools = handleTest ./disable-installer-tools.nix {};
|
||||
discourse = handleTest ./discourse.nix {};
|
||||
dnscrypt-proxy2 = handleTestOn ["x86_64-linux"] ./dnscrypt-proxy2.nix {};
|
||||
dnscrypt-wrapper = handleTestOn ["x86_64-linux"] ./dnscrypt-wrapper {};
|
||||
|
|
29
nixos/tests/disable-installer-tools.nix
Normal file
29
nixos/tests/disable-installer-tools.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... }:
|
||||
|
||||
{
|
||||
name = "disable-installer-tools";
|
||||
|
||||
machine =
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
system.disableInstallerTools = true;
|
||||
boot.enableContainers = false;
|
||||
environment.defaultPackages = [];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.wait_until_succeeds("pgrep -f 'agetty.*tty1'")
|
||||
|
||||
with subtest("nixos installer tools should not be included"):
|
||||
machine.fail("which nixos-rebuild")
|
||||
machine.fail("which nixos-install")
|
||||
machine.fail("which nixos-generate-config")
|
||||
machine.fail("which nixos-enter")
|
||||
machine.fail("which nixos-version")
|
||||
machine.fail("which nixos-build-vms")
|
||||
|
||||
with subtest("perl should not be included"):
|
||||
machine.fail("which perl")
|
||||
'';
|
||||
})
|
Loading…
Reference in a new issue