File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -762,3 +762,34 @@ def test_container_suseconnect_adds_repos(container_per_test: ContainerData):
762762 container_per_test .connection .check_output ("zypper -n ref" )
763763 repos = get_repos_from_connection (container_per_test .connection )
764764 assert len (repos ) > 3
765+
766+
767+ @pytest .mark .skipif (True , reason = "not yet deleted" )
768+ def test_no_ldconfig_cache (auto_container ):
769+ """Ensure that there are no leftover backup files in /var/tmp and other locations."""
770+
771+ assert not auto_container .connection .file (
772+ "/var/cache/ldconfig/aux-cache"
773+ ).exists , (
774+ "machine-specific /var/cache/ldconfig/aux-cache still exists in container"
775+ )
776+
777+
778+ def test_no_shadow_backup (auto_container ):
779+ """Ensure that there are no leftover backup files of /etc/shadow."""
780+
781+ auto_container .connection .check_output ("ls -1 /var/tmp" ).strip () == ""
782+ assert not auto_container .connection .file ("/etc/shadow-" ).exists , (
783+ "backup file of /etc/shadow found"
784+ )
785+
786+
787+ @pytest .mark .parametrize ("container" , CONTAINERS_WITHOUT_ZYPPER , indirect = True )
788+ def test_no_zypper_leftover_files (
789+ container : ContainerData ,
790+ ) -> None :
791+ """Ensure that there are no leftover files that only zypper needs."""
792+
793+ assert not container .connection .file (
794+ "/var/lib/zypp/AnonymousUniqueId"
795+ ).exists
You can’t perform that action at this time.
0 commit comments