diff --git a/tests/test_init.py b/tests/test_init.py index dc9ef766..0d0c8a49 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -113,6 +113,20 @@ def test_journald(self, auto_container): "Reached target Multi-User System" in journal.stdout ), "Multi-User target was not reached" + def test_systemd_groups(self, auto_container): + """ + Ensure the expected systemd groups are being created + """ + # Check that all the groups are there + for group in ( + "systemd-journal", + "systemd-network", + "systemd-timesync", + ): + assert group in auto_container.connection.check_output( + f"getent group {group}" + ), f"group {group} is missing" + def test_hostnamectl(self, auto_container, container_runtime): """ Ensure :command:`hostnamectl` works correctly by asserting expected values