From eba6713e8f47b4f50374f8bf27034a3bc2826514 Mon Sep 17 00:00:00 2001 From: Lucas Savva Date: Sat, 22 May 2021 18:58:24 +0200 Subject: [PATCH] nixos/tests/acme: test access to files outside /var/lib/acme in postRun --- nixos/tests/acme.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/tests/acme.nix b/nixos/tests/acme.nix index 6532fc4ac1d4..72b7bb8a396a 100644 --- a/nixos/tests/acme.nix +++ b/nixos/tests/acme.nix @@ -105,9 +105,9 @@ in import ./make-test-python.nix ({ lib, ... }: { security.acme.certs."a.example.test".keyType = "ec384"; security.acme.certs."a.example.test".postRun = '' set -euo pipefail - touch test - chown root:root test - echo testing > test + touch /home/test + chown root:root /home/test + echo testing > /home/test ''; }; @@ -383,7 +383,7 @@ in import ./make-test-python.nix ({ lib, ... }: { switch_to(webserver, "cert-change") webserver.wait_for_unit("acme-finished-a.example.test.target") check_connection_key_bits(client, "a.example.test", "384") - webserver.succeed("grep testing /var/lib/acme/a.example.test/test") + webserver.succeed("grep testing /home/test") # Clean to remove the testing file (and anything else messy we did) webserver.succeed("systemctl clean acme-a.example.test.service --what=state")