diff --git a/nixos/tests.nix b/nixos/tests.nix index 47ba3af..02ac384 100644 --- a/nixos/tests.nix +++ b/nixos/tests.nix @@ -158,6 +158,13 @@ }]; }; + # Create system user for testing + users.users.webref = { + isSystemUser = true; + group = "webref"; + }; + users.groups.webref = {}; + environment.systemPackages = with pkgs; [ python3 nmap @@ -169,7 +176,7 @@ start_all() machine.wait_for_unit("postgresql.service") - # Verify database is accessible locally + # Verify database is accessible with webref user machine.succeed("sudo -u webref psql webref -c 'SELECT 1;'") machine.succeed("echo '✅ Security test passed'")