Ensure the user and group used by @with_system_user_and_group are consistent.

This commit is contained in:
Gareth J. Greenaway 2019-06-11 15:41:38 -07:00
parent e03ab81b99
commit fd0ba0aea9
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41

View file

@ -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):