mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Ensure the user and group used by @with_system_user_and_group are consistent.
This commit is contained in:
parent
e03ab81b99
commit
fd0ba0aea9
1 changed files with 7 additions and 4 deletions
|
@ -74,6 +74,9 @@ else:
|
|||
FILEPILLARDEF = '/tmp/filepillar-defaultvalue'
|
||||
FILEPILLARGIT = '/tmp/filepillar-bar'
|
||||
|
||||
TEST_SYSTEM_USER = 'test_system_user'
|
||||
TEST_SYSTEM_GROUP = 'test_system_group'
|
||||
|
||||
|
||||
def _test_managed_file_mode_keep_helper(testcase, local=False):
|
||||
'''
|
||||
|
@ -2476,7 +2479,7 @@ class FileTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
@skip_if_not_root
|
||||
@skipIf(not HAS_PWD, "pwd not available. Skipping test")
|
||||
@skipIf(not HAS_GRP, "grp not available. Skipping test")
|
||||
@with_system_user_and_group('user12209', 'group12209',
|
||||
@with_system_user_and_group(TEST_SYSTEM_USER, TEST_SYSTEM_GROUP,
|
||||
on_existing='delete', delete=True)
|
||||
@with_tempdir()
|
||||
def test_issue_12209_follow_symlinks(self, tempdir, user, group):
|
||||
|
@ -2512,7 +2515,7 @@ class FileTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
@skip_if_not_root
|
||||
@skipIf(not HAS_PWD, "pwd not available. Skipping test")
|
||||
@skipIf(not HAS_GRP, "grp not available. Skipping test")
|
||||
@with_system_user_and_group('user12209', 'group12209',
|
||||
@with_system_user_and_group(TEST_SYSTEM_USER, TEST_SYSTEM_GROUP,
|
||||
on_existing='delete', delete=True)
|
||||
@with_tempdir()
|
||||
def test_issue_12209_no_follow_symlinks(self, tempdir, user, group):
|
||||
|
@ -2637,7 +2640,7 @@ class FileTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
@skip_if_not_root
|
||||
@skipIf(not HAS_PWD, "pwd not available. Skipping test")
|
||||
@skipIf(not HAS_GRP, "grp not available. Skipping test")
|
||||
@with_system_user_and_group('test_setuid_user', 'test_setuid_group',
|
||||
@with_system_user_and_group(TEST_SYSTEM_USER, TEST_SYSTEM_GROUP,
|
||||
on_existing='delete', delete=True)
|
||||
def test_owner_after_setuid(self, user, group):
|
||||
|
||||
|
@ -2694,7 +2697,7 @@ class FileTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
@skip_if_not_root
|
||||
@skipIf(not HAS_PWD, "pwd not available. Skipping test")
|
||||
@skipIf(not HAS_GRP, "grp not available. Skipping test")
|
||||
@with_system_user_and_group('user12209', 'group12209',
|
||||
@with_system_user_and_group(TEST_SYSTEM_USER, TEST_SYSTEM_GROUP,
|
||||
on_existing='delete', delete=True)
|
||||
@with_tempdir()
|
||||
def test_issue_48336_file_managed_mode_setuid(self, tempdir, user, group):
|
||||
|
|
Loading…
Add table
Reference in a new issue