mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #47959 from twangboy/fix_test_service
Fix failing test when service doesn't exist
This commit is contained in:
commit
a67b21ef3d
1 changed files with 5 additions and 1 deletions
|
@ -128,7 +128,11 @@ class ServiceModuleTest(ModuleCase):
|
|||
# currently upstart does not have a mechanism to report if disabling a service fails if does not exist
|
||||
self.assertTrue(self.run_function('service.disable', [srv_name]))
|
||||
else:
|
||||
self.assertFalse(self.run_function('service.disable', [srv_name]))
|
||||
if salt.utils.is_windows():
|
||||
disable = self.run_function('service.disable', [srv_name])
|
||||
self.assertTrue('error' in disable.lower())
|
||||
else:
|
||||
self.assertFalse(self.run_function('service.disable', [srv_name]))
|
||||
|
||||
if salt.utils.is_darwin():
|
||||
self.assertFalse(self.run_function('service.disabled', [srv_name]))
|
||||
|
|
Loading…
Add table
Reference in a new issue