about summary refs log tree commit diff
path: root/nixos/tests/custom-ca.nix
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2021-11-22 21:33:23 -0800
committerJonathan Ringer <jonringer117@gmail.com>2021-11-22 21:33:23 -0800
commit4b73049ccc2f309919629bdf105c2611383e691e (patch)
treeae9fe247a2f7838457c7009ffe36413960b8ce38 /nixos/tests/custom-ca.nix
parente46718d278bf9a74bfda21ab5570c571788fc409 (diff)
parent40d43349e66e87b1009cc945e42acd90892f5306 (diff)
Merge remote-tracking branch 'origin/staging' into staging-next
Conflicts:
	nixos/tests/custom-ca.nix
Diffstat (limited to 'nixos/tests/custom-ca.nix')
-rw-r--r--nixos/tests/custom-ca.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/nixos/tests/custom-ca.nix b/nixos/tests/custom-ca.nix
index 0ab49f3b34306..a55449a397a7c 100644
--- a/nixos/tests/custom-ca.nix
+++ b/nixos/tests/custom-ca.nix
@@ -82,6 +82,9 @@ in
       # chromium-based browsers refuse to run as root
       test-support.displayManager.auto.user = "alice";
 
+      # browsers may hang with the default memory
+      virtualisation.memorySize = 600;
+
       networking.hosts."127.0.0.1" = [ "good.example.com" "bad.example.com" ];
       security.pki.certificateFiles = [ "${example-good-cert}/ca.crt" ];
 
@@ -160,7 +163,7 @@ in
         browser = command.split()[0]
         with subtest("Good certificate is trusted in " + browser):
             execute_as(
-                "alice", f"env P11_KIT_DEBUG=trust {command} https://good.example.com & >&2"
+                "alice", f"{command} https://good.example.com >&2 &"
             )
             wait_for_window_as("alice", browser)
             machine.wait_for_text("It works!")
@@ -168,9 +171,9 @@ in
             execute_as("alice", "xdotool key ctrl+w")  # close tab
 
         with subtest("Unknown CA is untrusted in " + browser):
-            execute_as("alice", f"{command} https://bad.example.com & >&2")
+            execute_as("alice", f"{command} https://bad.example.com >&2 &")
             machine.wait_for_text(error)
             machine.screenshot("bad" + browser)
-            machine.succeed("pkill " + browser)
+            machine.succeed("pkill -f " + browser)
   '';
 })