From 7d0b5b3a94afcb751e4e79ec83f9ee8e3c5b8a0b Mon Sep 17 00:00:00 2001 From: nikstur Date: Wed, 1 Nov 2023 16:01:49 +0100 Subject: nixos/nix-channnel: fix setting up the default channel again --- nixos/tests/activation/nix-channel.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'nixos/tests') diff --git a/nixos/tests/activation/nix-channel.nix b/nixos/tests/activation/nix-channel.nix index a01a66ebc1bf..d26ea98e56cc 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" ''; } -- cgit 1.4.1