Skip to content

Commit b8c296f

Browse files
authored
Merge pull request #12322 from DeterminateSystems/fix-fetchurl-test
Fix fetchurl test
2 parents 9a71c3c + 9e324df commit b8c296f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/nixos/fetchurl.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let
2222
in
2323

2424
{
25-
name = "nss-preload";
25+
name = "fetchurl";
2626

2727
nodes = {
2828
machine = { pkgs, ... }: {
@@ -76,7 +76,7 @@ in
7676
# Fetching from a server with an untrusted cert should fail.
7777
err = machine.fail("nix build --no-substitute --expr 'import <nix/fetchurl.nix> { url = \"https://bad/index.html\"; hash = \"sha256-rsBwZF/lPuOzdjBZN2E08FjMM3JHyXit0Xi2zN+wAZ8=\"; }' 2>&1")
7878
print(err)
79-
assert "SSL certificate problem: self-signed certificate" in err
79+
assert "SSL peer certificate or SSH remote key was not OK" in err
8080
8181
# Fetching from a server with a trusted cert should work via environment variable override.
8282
machine.succeed("NIX_SSL_CERT_FILE=/tmp/cafile.pem nix build --no-substitute --expr 'import <nix/fetchurl.nix> { url = \"https://bad/index.html\"; hash = \"sha256-rsBwZF/lPuOzdjBZN2E08FjMM3JHyXit0Xi2zN+wAZ8=\"; }'")

0 commit comments

Comments
 (0)