From fd14641ef586265693a2f1e70910b0816d5832c7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 9 Jul 2013 16:12:34 +0200 Subject: [PATCH] Fix the sshd check in the rebuildCD test Also reduce the amount of memory. --- modules/profiles/installation-device.nix | 2 +- tests/installer.nix | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/profiles/installation-device.nix b/modules/profiles/installation-device.nix index 34f1b1b05b4e..5a92789e5d90 100644 --- a/modules/profiles/installation-device.nix +++ b/modules/profiles/installation-device.nix @@ -41,7 +41,7 @@ with pkgs.lib; # Allow sshd to be started manually through "start sshd". services.openssh.enable = true; - jobs.sshd.startOn = pkgs.lib.mkOverride 50 ""; + systemd.services.sshd.wantedBy = mkOverride 50 []; # Enable wpa_supplicant, but don't start it by default. networking.wireless.enable = true; diff --git a/tests/installer.nix b/tests/installer.nix index f75965f5d129..a07beaeb1e6e 100644 --- a/tests/installer.nix +++ b/tests/installer.nix @@ -326,13 +326,12 @@ in { nodes = { }; testScript = '' - # damn, it's costly to evaluate nixos-rebuild (1G of ram) - my $machine = createMachine({ cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '-m 1024' }); + my $machine = createMachine({ cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '-m 768' }); $machine->start; # Enable sshd service. $machine->succeed( - "sed -i 's,^}\$,jobs.sshd.startOn = pkgs.lib.mkOverride 0 \"startup\"; },' /etc/nixos/configuration.nix" + "sed -i 's,^}\$,systemd.services.sshd.wantedBy = pkgs.lib.mkOverride 0 [\"multi-user.target\"]; },' /etc/nixos/configuration.nix" ); $machine->succeed("cat /etc/nixos/configuration.nix >&2"); @@ -341,8 +340,8 @@ in { $machine->succeed("nixos-rebuild test"); # Connect to it-self. - #$machine->waitForUnit("sshd"); - #$machine->succeed("ssh root@127.0.0.1 echo hello"); + $machine->waitForUnit("sshd"); + $machine->waitForOpenPort(22); $machine->shutdown; '';