mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
nixosTests.labgrid: Add systemd hardening test
to prevent unnoticed degradation. The limit '11' matches the current exposure level '1.1'.
This commit is contained in:
@@ -57,5 +57,10 @@
|
||||
coordinator.wait_for_open_port(20408)
|
||||
out = client.succeed("labgrid-client places")
|
||||
assert_contains(out, "testplace")
|
||||
|
||||
with subtest("Check systemd hardening does not degrade unnoticed"):
|
||||
exact_threshold = 11
|
||||
out = coordinator.fail(f"systemd-analyze security labgrid-coordinator.service --threshold={exact_threshold-1}")
|
||||
out = coordinator.succeed(f"systemd-analyze security labgrid-coordinator.service --threshold={exact_threshold}")
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user