summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authornikstur <nikstur@outlook.com>2023-11-01 16:01:49 +0100
committernikstur <nikstur@outlook.com>2023-11-01 16:23:28 +0100
commit7d0b5b3a94afcb751e4e79ec83f9ee8e3c5b8a0b (patch)
treeb6fe4bf5594899d7e69d6cdcec227edae2b6b477 /nixos/tests
parentd64dbf725396bd6c2371de5b5e3683a626cb7e45 (diff)
downloadnixpkgs-7d0b5b3a94afcb751e4e79ec83f9ee8e3c5b8a0b.tar
nixpkgs-7d0b5b3a94afcb751e4e79ec83f9ee8e3c5b8a0b.tar.gz
nixpkgs-7d0b5b3a94afcb751e4e79ec83f9ee8e3c5b8a0b.tar.bz2
nixpkgs-7d0b5b3a94afcb751e4e79ec83f9ee8e3c5b8a0b.tar.lz
nixpkgs-7d0b5b3a94afcb751e4e79ec83f9ee8e3c5b8a0b.tar.xz
nixpkgs-7d0b5b3a94afcb751e4e79ec83f9ee8e3c5b8a0b.tar.zst
nixpkgs-7d0b5b3a94afcb751e4e79ec83f9ee8e3c5b8a0b.zip
nixos/nix-channnel: fix setting up the default channel again
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/activation/nix-channel.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/tests/activation/nix-channel.nix b/nixos/tests/activation/nix-channel.nix
index a01a66ebc1b..d26ea98e56c 100644
--- a/nixos/tests/activation/nix-channel.nix
+++ b/nixos/tests/activation/nix-channel.nix
@@ -11,7 +11,16 @@
   };
 
   testScript = { nodes, ... }: ''
+    machine.start(allow_reboot=True)
+
     assert machine.succeed("cat /root/.nix-channels") == "${nodes.machine.system.defaultChannel} nixos\n"
+
+    nixpkgs_unstable_channel = "https://nixos.org/channels/nixpkgs-unstable nixpkgs"
+    machine.succeed(f"echo '{nixpkgs_unstable_channel}' > /root/.nix-channels")
+
+    machine.reboot()
+
+    assert machine.succeed("cat /root/.nix-channels") == f"{nixpkgs_unstable_channel}\n"
   '';
 
 }