0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixosTests.custom-ca: handleTest -> runTest

This commit is contained in:
Sizhe Zhao 2025-06-07 21:06:41 +08:00
parent ea619766ea
commit af4f64154f
No known key found for this signature in database
GPG key ID: ED1807251A7DA08F
2 changed files with 5 additions and 11 deletions

View file

@ -388,7 +388,7 @@ in
cryptpad = runTest ./cryptpad.nix;
cups-pdf = runTest ./cups-pdf.nix;
curl-impersonate = runTest ./curl-impersonate.nix;
custom-ca = handleTest ./custom-ca.nix { };
custom-ca = import ./custom-ca.nix { inherit pkgs runTest; };
croc = runTest ./croc.nix;
cross-seed = runTest ./cross-seed.nix;
cyrus-imap = runTest ./cyrus-imap.nix;

View file

@ -3,13 +3,7 @@
# The test checks that certificates issued by a custom
# trusted CA are accepted but those from an unknown CA are rejected.
{
system ? builtins.currentSystem,
config ? { },
pkgs ? import ../.. { inherit system config; },
}:
with import ../lib/testing-python.nix { inherit system pkgs; };
{ runTest, pkgs }:
let
inherit (pkgs) lib;
@ -104,7 +98,7 @@ let
};
};
curlTest = makeTest {
curlTest = runTest {
name = "custom-ca-curl";
meta.maintainers = with lib.maintainers; [ rnhmjoj ];
nodes.machine = { ... }: webserverConfig;
@ -121,7 +115,7 @@ let
mkBrowserTest =
browser: testParams:
makeTest {
runTest {
name = "custom-ca-${browser}";
meta.maintainers = with lib.maintainers; [ rnhmjoj ];
@ -199,7 +193,7 @@ in
{
curl = curlTest;
}
// pkgs.lib.mapAttrs mkBrowserTest {
// lib.mapAttrs mkBrowserTest {
firefox = {
error = "Security Risk";
};