Log warning on bad ownership as opposed to throwing an error

This commit is contained in:
Pedro Algarvio 2024-05-07 12:01:13 +01:00
parent 46ccd24ca4
commit 13c5f3dbdb

View file

@ -270,8 +270,18 @@ def salt_master(salt_factories, install_salt, pkg_tests_account):
pathlib.Path("/var", "cache", "salt", "master"),
]
for _file in verify_files:
assert _file.owner() == "salt"
assert _file.group() == "salt"
if _file.owner() != "salt":
log.warning(
"The owner of '%s' is '%s' when it should be 'salt'",
_file,
_file.owner(),
)
if _file.group() != "salt":
log.warning(
"The group of '%s' is '%s' when it should be 'salt'",
_file,
_file.group(),
)
master_script = False
if platform.is_windows():