about summary refs log tree commit diff
path: root/nixos/tests/switch-test.nix
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2022-03-13 19:09:06 +0100
committerJanne Heß <janne@hess.ooo>2022-03-20 13:01:11 +0100
commit5c00fe6b1bfba588f4e9c7fdcc9de8c3b7b191f7 (patch)
tree1b8eec88292d786cd442f14fab668655e6ab2157 /nixos/tests/switch-test.nix
parent73a4c4972bd757f5c1b1021de3471da6ed34d032 (diff)
nixos/switchTest: Also test the os-release parser
Diffstat (limited to 'nixos/tests/switch-test.nix')
-rw-r--r--nixos/tests/switch-test.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/tests/switch-test.nix b/nixos/tests/switch-test.nix
index 93eee4babc2de..4136aa336acb2 100644
--- a/nixos/tests/switch-test.nix
+++ b/nixos/tests/switch-test.nix
@@ -502,6 +502,10 @@ in {
     machine.succeed(
         "${stderrRunner} ${originalSystem}/bin/switch-to-configuration test"
     )
+    # This tests whether the /etc/os-release parser works which is a fallback
+    # when /etc/NIXOS is missing. If the parser does not work, switch-to-configuration
+    # would fail.
+    machine.succeed("rm /etc/NIXOS")
     machine.succeed(
         "${stderrRunner} ${otherSystem}/bin/switch-to-configuration test"
     )