summary refs log tree commit diff
path: root/nixos/tests/installer.nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-07-07 16:41:40 +0200
committerRobert Hensing <robert@roberthensing.nl>2023-07-07 19:00:05 +0200
commit218ef2f4059f7b031f93cd4ac3fab9a3faf81b8b (patch)
treeacad435457431f73e834d33a8df20946472db264 /nixos/tests/installer.nix
parente08fab0406465bc1ba9f4d2895159c89e952ad71 (diff)
downloadnixpkgs-218ef2f4059f7b031f93cd4ac3fab9a3faf81b8b.tar
nixpkgs-218ef2f4059f7b031f93cd4ac3fab9a3faf81b8b.tar.gz
nixpkgs-218ef2f4059f7b031f93cd4ac3fab9a3faf81b8b.tar.bz2
nixpkgs-218ef2f4059f7b031f93cd4ac3fab9a3faf81b8b.tar.lz
nixpkgs-218ef2f4059f7b031f93cd4ac3fab9a3faf81b8b.tar.xz
nixpkgs-218ef2f4059f7b031f93cd4ac3fab9a3faf81b8b.tar.zst
nixpkgs-218ef2f4059f7b031f93cd4ac3fab9a3faf81b8b.zip
nixosTests.installer: Make sure we boot into the config we generated
Diffstat (limited to 'nixos/tests/installer.nix')
-rw-r--r--nixos/tests/installer.nix7
1 files changed, 7 insertions, 0 deletions
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
             <nixpkgs/nixos/modules/testing/test-instrumentation.nix>
           ];
 
+        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()