about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2023-11-14 10:52:21 +0100
committerGitHub <noreply@github.com>2023-11-14 10:52:21 +0100
commitf9c7c12de6a7848c64358837ea1970e9fa5e61a7 (patch)
tree3a84e0cff59c285d1de5db025085c50e881385d4 /nixos/tests
parent9290bb56546e4c9b99f7960ce08943a10108d65a (diff)
parentfc3f56f2febb5bc7270eee2390f5756a250430ff (diff)
Merge pull request #266702 from nh2/plausible-listen-address-no-distributed-erlang
plausible, nixos/plausible: Add `listenAddress` option
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/plausible.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/tests/plausible.nix b/nixos/tests/plausible.nix
index 9afd3db75de8a..9c26c509a5ab5 100644
--- a/nixos/tests/plausible.nix
+++ b/nixos/tests/plausible.nix
@@ -8,9 +8,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
     virtualisation.memorySize = 4096;
     services.plausible = {
       enable = true;
-      releaseCookiePath = "${pkgs.runCommand "cookie" { } ''
-        ${pkgs.openssl}/bin/openssl rand -base64 64 >"$out"
-      ''}";
       adminUser = {
         email = "admin@example.org";
         passwordFile = "${pkgs.writeText "pwd" "foobar"}";
@@ -28,6 +25,10 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
     machine.wait_for_unit("plausible.service")
     machine.wait_for_open_port(8000)
 
+    # Ensure that the software does not make not make the machine
+    # listen on any public interfaces by default.
+    machine.fail("ss -tlpn 'src = 0.0.0.0 or src = [::]' | grep LISTEN")
+
     machine.succeed("curl -f localhost:8000 >&2")
 
     machine.succeed("curl -f localhost:8000/js/script.js >&2")