Skip to content

Commit

Permalink
Verify that the expected groups are created in the init container
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmueller committed Dec 7, 2023
1 parent f91d142 commit bd6c238
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bd6c238

Please sign in to comment.