From 218ef2f4059f7b031f93cd4ac3fab9a3faf81b8b Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 7 Jul 2023 16:41:40 +0200 Subject: nixosTests.installer: Make sure we boot into the config we generated --- nixos/tests/installer.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 4f4b9151884..c800299db11 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -21,6 +21,8 @@ let ]; + networking.hostName = "thatworked"; + documentation.enable = false; # To ensure that we can rebuild the grub configuration on the nixos-rebuild @@ -232,6 +234,11 @@ let machine = create_machine_named("boot-after-rebuild-switch") ${preBootCommands} machine.wait_for_unit("network.target") + + # Sanity check, is it the configuration.nix we generated? + hostname = machine.succeed("hostname").strip() + assert hostname == "thatworked" + ${postBootCommands} machine.shutdown() -- cgit 1.4.1