Fix the sshd check in the rebuildCD test
Also reduce the amount of memory.
This commit is contained in:
parent
5000d99149
commit
fd14641ef5
@ -41,7 +41,7 @@ with pkgs.lib;
|
|||||||
|
|
||||||
# Allow sshd to be started manually through "start sshd".
|
# Allow sshd to be started manually through "start sshd".
|
||||||
services.openssh.enable = true;
|
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.
|
# Enable wpa_supplicant, but don't start it by default.
|
||||||
networking.wireless.enable = true;
|
networking.wireless.enable = true;
|
||||||
|
@ -326,13 +326,12 @@ in {
|
|||||||
nodes = { };
|
nodes = { };
|
||||||
testScript =
|
testScript =
|
||||||
''
|
''
|
||||||
# damn, it's costly to evaluate nixos-rebuild (1G of ram)
|
my $machine = createMachine({ cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '-m 768' });
|
||||||
my $machine = createMachine({ cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '-m 1024' });
|
|
||||||
$machine->start;
|
$machine->start;
|
||||||
|
|
||||||
# Enable sshd service.
|
# Enable sshd service.
|
||||||
$machine->succeed(
|
$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");
|
$machine->succeed("cat /etc/nixos/configuration.nix >&2");
|
||||||
@ -341,8 +340,8 @@ in {
|
|||||||
$machine->succeed("nixos-rebuild test");
|
$machine->succeed("nixos-rebuild test");
|
||||||
|
|
||||||
# Connect to it-self.
|
# Connect to it-self.
|
||||||
#$machine->waitForUnit("sshd");
|
$machine->waitForUnit("sshd");
|
||||||
#$machine->succeed("ssh root@127.0.0.1 echo hello");
|
$machine->waitForOpenPort(22);
|
||||||
|
|
||||||
$machine->shutdown;
|
$machine->shutdown;
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user