From 5c00fe6b1bfba588f4e9c7fdcc9de8c3b7b191f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Sun, 13 Mar 2022 19:09:06 +0100 Subject: [PATCH] nixos/switchTest: Also test the os-release parser --- nixos/tests/switch-test.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/tests/switch-test.nix b/nixos/tests/switch-test.nix index 93eee4babc2d..4136aa336acb 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" )