mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Expose what's happening behind the scenes for test_user_if_present_with_gid()
* Expose what's happening in `integration.states.user.UserTest.test_user_if_present_with_gid()`. * Update code that was using the old `SaltReturnAssertsMixIn`.
This commit is contained in:
parent
1f03ba59f1
commit
3401445e8b
@ -10,7 +10,8 @@ import integration
|
||||
import grp
|
||||
|
||||
|
||||
class UserTest(integration.ModuleCase):
|
||||
class UserTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixIn):
|
||||
'''
|
||||
test for user absent
|
||||
'''
|
||||
@ -27,8 +28,7 @@ class UserTest(integration.ModuleCase):
|
||||
def test_user_if_present_with_gid(self):
|
||||
# TODO:dc fix failing test. Exception in ret
|
||||
ret = self.run_state('user.present', name='nobody', gid="nobody")
|
||||
result = ret[next(iter(ret))]['result']
|
||||
self.assertTrue(result)
|
||||
self.assertSaltTrueReturn(ret)
|
||||
|
||||
@destructiveTest
|
||||
@skipIf(os.geteuid() is not 0, 'you must be this root to run this test')
|
||||
|
@ -35,10 +35,7 @@ class VirtualenvTest(integration.ModuleCase,
|
||||
ret = self.run_function(
|
||||
'state.sls', mods='issue-1959-virtualenv-runas'
|
||||
)
|
||||
self.assertTrue(isinstance(ret, dict))
|
||||
self.assertNotEqual(ret, {})
|
||||
for part in ret.itervalues():
|
||||
self.assertSaltTrueReturn(part)
|
||||
self.assertSaltTrueReturn(ret)
|
||||
|
||||
# Lets check proper ownership
|
||||
statinfo = self.run_function('file.stats', [venv_dir])
|
||||
|
Loading…
Reference in New Issue
Block a user