mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
only stop service if its running
This commit is contained in:
parent
e15e674955
commit
185c9e9ae2
1 changed files with 3 additions and 2 deletions
|
@ -63,8 +63,9 @@ class ServiceTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
'''
|
||||
test service.running state module
|
||||
'''
|
||||
stop_service = self.run_function('service.stop', name=self.service_name)
|
||||
self.assertTrue(stop_service)
|
||||
if self.run_function('service.status', name=self.service_name):
|
||||
stop_service = self.run_function('service.stop', name=self.service_name)
|
||||
self.assertTrue(stop_service)
|
||||
self.check_service_status(self.stopped)
|
||||
|
||||
if salt.utils.platform.is_darwin():
|
||||
|
|
Loading…
Add table
Reference in a new issue