nixos/tests/postfix-tlspol: assert empty policies for localhost
This commit is contained in:
parent
7874cc6005
commit
d0218043a9
@ -10,9 +10,12 @@
|
||||
nodes.machine = {
|
||||
services.postfix.enable = true;
|
||||
services.postfix-tlspol.enable = true;
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
services.dnsmasq = {
|
||||
enable = true;
|
||||
settings.selfmx = true;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
import json
|
||||
@ -26,6 +29,8 @@
|
||||
response = json.loads((machine.succeed("postfix-tlspol -query localhost")))
|
||||
machine.log(json.dumps(response, indent=2))
|
||||
|
||||
assert response["dane"]["policy"] == "", f"Unexpected DANE policy for localhost: {response["dane"]["policy"]}"
|
||||
assert response["mta-sts"]["policy"] == "", f"Unexpected MTA-STS policy for localhost: {response["mta-sts"]["policy"]}"
|
||||
|
||||
machine.log(machine.execute("systemd-analyze security postfix-tlspol.service | grep -v ✓")[1])
|
||||
'';
|
||||
|
Loading…
x
Reference in New Issue
Block a user