aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/dependencies.nix27
-rw-r--r--tests/functional/hash-check.nix21
-rw-r--r--tests/nixos/remote-builds-ssh-ng.nix3
3 files changed, 23 insertions, 28 deletions
diff --git a/tests/functional/dependencies.nix b/tests/functional/dependencies.nix
index be1a7ae9a..0ede76b71 100644
--- a/tests/functional/dependencies.nix
+++ b/tests/functional/dependencies.nix
@@ -1,8 +1,7 @@
{ hashInvalidator ? "" }:
with import ./config.nix;
-let {
-
+let
input0 = mkDerivation {
name = "dependencies-input-0";
buildCommand = "mkdir $out; echo foo > $out/bar";
@@ -32,17 +31,15 @@ let {
outputHashAlgo = "sha256";
outputHash = "1dq9p0hnm1y75q2x40fws5887bq1r840hzdxak0a9djbwvx0b16d";
};
-
- body = mkDerivation {
- name = "dependencies-top";
- builder = ./dependencies.builder0.sh + "/FOOBAR/../.";
- input1 = input1 + "/.";
- input2 = "${input2}/.";
- input1_drv = input1;
- input2_drv = input2;
- input0_drv = input0;
- fod_input_drv = fod_input;
- meta.description = "Random test package";
- };
-
+in
+mkDerivation {
+ name = "dependencies-top";
+ builder = ./dependencies.builder0.sh + "/FOOBAR/../.";
+ input1 = input1 + "/.";
+ input2 = "${input2}/.";
+ input1_drv = input1;
+ input2_drv = input2;
+ input0_drv = input0;
+ fod_input_drv = fod_input;
+ meta.description = "Random test package";
}
diff --git a/tests/functional/hash-check.nix b/tests/functional/hash-check.nix
index f029f0cc9..6095bc57f 100644
--- a/tests/functional/hash-check.nix
+++ b/tests/functional/hash-check.nix
@@ -1,5 +1,4 @@
-let {
-
+let
input1 = derivation {
name = "dependencies-input-1";
system = "i086-msdos";
@@ -16,14 +15,12 @@ let {
outputHashAlgo = "md5";
outputHash = "ffffffffffffffffffffffffffffffff";
};
-
- body = derivation {
- name = "dependencies";
- system = "i086-msdos";
- builder = "/bar/sh";
- args = ["-e" "-x" (./dummy + "/FOOBAR/../.")];
- input1 = input1 + "/.";
- inherit input2;
- };
-
+in
+derivation {
+ name = "dependencies";
+ system = "i086-msdos";
+ builder = "/bar/sh";
+ args = ["-e" "-x" (./dummy + "/FOOBAR/../.")];
+ input1 = input1 + "/.";
+ inherit input2;
}
diff --git a/tests/nixos/remote-builds-ssh-ng.nix b/tests/nixos/remote-builds-ssh-ng.nix
index 8deb9a504..ec12f9066 100644
--- a/tests/nixos/remote-builds-ssh-ng.nix
+++ b/tests/nixos/remote-builds-ssh-ng.nix
@@ -97,7 +97,8 @@ in
builder.wait_for_unit("sshd.service")
out = client.fail("nix-build ${expr nodes.client 1} 2>&1")
- assert "error: failed to start SSH connection to 'root@builder': Host key verification failed" in out, f"No host verification error in {out}"
+ assert "Host key verification failed." in out, f"No host verification error:\n{out}"
+ assert "warning: SSH to 'root@builder' failed, stdout first line: '''" in out, f"No details about which host:\n{out}"
client.succeed(f"ssh -o StrictHostKeyChecking=no {builder.name} 'echo hello world' >&2")