mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
commit
b72b17a565
@ -161,7 +161,7 @@ sys.stdout.write('cheese')
|
||||
result = self.run_function('cmd.run_stdout', [cmd]).strip()
|
||||
self.assertEqual(result, expected_result)
|
||||
|
||||
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
def test_quotes_runas(self):
|
||||
'''
|
||||
cmd.run with quoted command
|
||||
|
@ -27,7 +27,7 @@ class UseraddModuleTest(integration.ModuleCase):
|
||||
)
|
||||
|
||||
@destructiveTest
|
||||
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
def test_groups_includes_primary(self):
|
||||
# Let's create a user, which usually creates the group matching the
|
||||
# name
|
||||
|
@ -27,7 +27,7 @@ class UseraddModuleTest(integration.ModuleCase):
|
||||
)
|
||||
|
||||
@destructiveTest
|
||||
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
def test_groups_includes_primary(self):
|
||||
# Let's create a user, which usually creates the group matching the
|
||||
# name
|
||||
|
@ -32,7 +32,7 @@ class StateMatchTest(integration.ModuleCase):
|
||||
ret
|
||||
)
|
||||
|
||||
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
def test_issue_2167_ipcidr_no_AttributeError(self):
|
||||
subnets = self.run_function('network.subnets')
|
||||
self.assertTrue(len(subnets) > 0)
|
||||
|
@ -33,7 +33,7 @@ class UserTest(integration.ModuleCase,
|
||||
self.assertSaltTrueReturn(ret)
|
||||
|
||||
@destructiveTest
|
||||
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
def test_user_not_present(self):
|
||||
'''
|
||||
This is a DESTRUCTIVE TEST it creates a new user on the minion.
|
||||
@ -46,7 +46,7 @@ class UserTest(integration.ModuleCase,
|
||||
self.assertSaltTrueReturn(ret)
|
||||
|
||||
@destructiveTest
|
||||
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
def test_user_present_nondefault(self):
|
||||
'''
|
||||
This is a DESTRUCTIVE TEST it creates a new user on the on the minion.
|
||||
@ -59,7 +59,7 @@ class UserTest(integration.ModuleCase,
|
||||
self.assertSaltTrueReturn(ret)
|
||||
|
||||
@destructiveTest
|
||||
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
def test_user_present_gid_from_name_default(self):
|
||||
'''
|
||||
This is a DESTRUCTIVE TEST. It creates a new user on the on the minion.
|
||||
@ -83,7 +83,7 @@ class UserTest(integration.ModuleCase,
|
||||
self.assertSaltTrueReturn(ret)
|
||||
|
||||
@destructiveTest
|
||||
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
def test_user_present_gid_from_name(self):
|
||||
'''
|
||||
This is a DESTRUCTIVE TEST it creates a new user on the on the minion.
|
||||
|
@ -27,7 +27,7 @@ class VirtualenvTest(integration.ModuleCase,
|
||||
self.skipTest('virtualenv not installed')
|
||||
|
||||
@destructiveTest
|
||||
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
def test_issue_1959_virtualenv_runas(self):
|
||||
user = 'issue-1959'
|
||||
if not self.run_function('user.add', [user]):
|
||||
|
@ -313,7 +313,7 @@ def parse_opts():
|
||||
|
||||
if any((options.module, options.client, options.shell, options.unit,
|
||||
options.state, options.runner, options.name,
|
||||
os.geteuid() is not 0, not options.run_destructive)):
|
||||
os.geteuid() != 0, not options.run_destructive)):
|
||||
parser.error(
|
||||
'No sense in generating the tests coverage report when not '
|
||||
'running the full test suite, including the destructive '
|
||||
|
Loading…
Reference in New Issue
Block a user