summary refs log tree commit diff
path: root/nixos/tests/acme.nix
diff options
context:
space:
mode:
authorLucas Savva <lucas@m1cr0man.com>2021-05-22 18:58:24 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2021-07-06 15:16:24 +0200
commiteba6713e8f47b4f50374f8bf27034a3bc2826514 (patch)
tree77d22fdc6c6f494f6b1ce9b9e9aca1f4b10ba934 /nixos/tests/acme.nix
parent7a10478ea7b992ffa1f19f389e53df0fe2aa936d (diff)
downloadnixpkgs-eba6713e8f47b4f50374f8bf27034a3bc2826514.tar
nixpkgs-eba6713e8f47b4f50374f8bf27034a3bc2826514.tar.gz
nixpkgs-eba6713e8f47b4f50374f8bf27034a3bc2826514.tar.bz2
nixpkgs-eba6713e8f47b4f50374f8bf27034a3bc2826514.tar.lz
nixpkgs-eba6713e8f47b4f50374f8bf27034a3bc2826514.tar.xz
nixpkgs-eba6713e8f47b4f50374f8bf27034a3bc2826514.tar.zst
nixpkgs-eba6713e8f47b4f50374f8bf27034a3bc2826514.zip
nixos/tests/acme: test access to files outside /var/lib/acme in postRun
Diffstat (limited to 'nixos/tests/acme.nix')
-rw-r--r--nixos/tests/acme.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/nixos/tests/acme.nix b/nixos/tests/acme.nix
index 6532fc4ac1d..72b7bb8a396 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")