File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -748,3 +748,21 @@ def test_container_suseconnect_adds_repos(container_per_test: ContainerData):
748748 container_per_test .connection .check_output ("zypper -n ref" )
749749 repos = get_repos_from_connection (container_per_test .connection )
750750 assert len (repos ) > 3
751+
752+
753+ def test_no_leftover_files (auto_container ):
754+ """Ensure that there are no leftover backup files in /var/tmp and other locations."""
755+
756+ auto_container .connection .check_output ("ls -1 /var/tmp" ).strip () == ""
757+ assert not auto_container .connection .file ("/etc/shadow-" ).exists , (
758+ "backup file of /etc/shadow found"
759+ )
760+
761+
762+ @pytest .mark .parametrize ("container" , CONTAINERS_WITHOUT_ZYPPER , indirect = True )
763+ def test_no_zypper_leftover_files (
764+ container : ContainerData ,
765+ ) -> None :
766+ """Ensure that there are no leftover files that only zypper needs."""
767+
768+ assert not container .connection .file ("/var/lib/zypp/AutoInstalled" ).exists
You can’t perform that action at this time.
0 commit comments