nixpkgs/nixos/tests/postfix-tlspol.nix
Martin Weinelt 2288aab12d
nixos/tests/postfix-tlspol: init
Simple test if the service comes up and the CLI can interact with it and
gives reasonable results.
2025-06-11 17:39:36 +02:00

30 lines
517 B
Nix

{
lib,
...
}:
{
name = "postfix-tlspol";
meta.maintainers = with lib.maintainers; [ hexa ];
nodes.machine = {
services.postfix-tlspol.enable = true;
};
enableOCR = true;
testScript = ''
import json
machine.wait_for_unit("postfix-tlspol.service")
with subtest("Interact with the service"):
machine.succeed("postfix-tlspol -purge")
response = json.loads((machine.succeed("postfix-tlspol -query localhost")))
machine.log(json.dumps(response, indent=2))
'';
}