Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,3 +875,34 @@ def test_uids_stable(
assert gid == expected_gid, (
f"Expected user {name} to have gid {expected_gid} but got {gid}"
)


@pytest.mark.skipif(True, reason="not yet deleted")
def test_no_ldconfig_cache(auto_container):
"""Ensure that there are no leftover backup files in /var/tmp and other locations."""

assert not auto_container.connection.file(
"/var/cache/ldconfig/aux-cache"
).exists, (
"machine-specific /var/cache/ldconfig/aux-cache still exists in container"
)


def test_no_shadow_backup(auto_container):
"""Ensure that there are no leftover backup files of /etc/shadow."""

auto_container.connection.check_output("ls -1 /var/tmp").strip() == ""
assert not auto_container.connection.file("/etc/shadow-").exists, (
"backup file of /etc/shadow found"
)


@pytest.mark.parametrize("container", CONTAINERS_WITHOUT_ZYPPER, indirect=True)
def test_no_zypper_leftover_files(
container: ContainerData,
) -> None:
"""Ensure that there are no leftover files that only zypper needs."""

assert not container.connection.file(
"/var/lib/zypp/AnonymousUniqueId"
).exists
Loading