Add interactive NetBox host installer
CI / php-store (push) Waiting to run
CI / python-components (push) Waiting to run

This commit is contained in:
2026-08-24 23:00:28 +02:00
parent a4cecec7b9
commit 541f107e1e
11 changed files with 551 additions and 8 deletions
+22
View File
@@ -0,0 +1,22 @@
import unittest
from pathlib import Path
class SystemdUnitTests(unittest.TestCase):
def test_socket_directory_is_traversable_but_socket_remains_restricted(self):
socket_unit = Path("systemd/netbox-store-agent.socket").read_text(encoding="utf-8")
self.assertIn("DirectoryMode=0755", socket_unit)
self.assertIn("SocketMode=0660", socket_unit)
self.assertIn("SocketGroup=netbox", socket_unit)
def test_state_traversal_does_not_relax_service_umask(self):
service_unit = Path("systemd/netbox-store-agent.service").read_text(encoding="utf-8")
self.assertIn("StateDirectoryMode=0711", service_unit)
self.assertIn("RuntimeDirectoryMode=0755", service_unit)
self.assertIn("UMask=0077", service_unit)
if __name__ == "__main__":
unittest.main()