mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Normalize the mode before we compare it.
This commit is contained in:
parent
08ad5665de
commit
2454652914
@ -2294,7 +2294,11 @@ class FileTest(ModuleCase, SaltReturnAssertsMixin):
|
||||
# Check that the owner and group are correct, and
|
||||
# the mode is what we expect
|
||||
temp_file_stats = os.stat(tempfile)
|
||||
|
||||
# Normalize the mode
|
||||
temp_file_mode = six.text_type(oct(stat.S_IMODE(temp_file_stats.st_mode)))
|
||||
temp_file_mode = salt.utils.files.normalize_mode(temp_file_mode)
|
||||
|
||||
self.assertEqual(temp_file_mode, '4750')
|
||||
self.assertEqual(pwd.getpwuid(temp_file_stats.st_uid).pw_name, user)
|
||||
self.assertEqual(grp.getgrgid(temp_file_stats.st_gid).gr_name, group)
|
||||
|
Loading…
Reference in New Issue
Block a user