mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
add service enabled test
This commit is contained in:
parent
1643bb7fd4
commit
0747f2e58a
1 changed files with 12 additions and 0 deletions
|
@ -239,6 +239,18 @@ class WinServiceTestCase(TestCase, LoaderModuleMockMixin):
|
|||
self.assertTrue(win_service.enabled('spongebob'))
|
||||
self.assertFalse(win_service.enabled('squarepants'))
|
||||
|
||||
def test_enabled_with_space_in_name(self):
|
||||
'''
|
||||
Test to check to see if the named
|
||||
service is enabled to start on boot
|
||||
when have space in service name
|
||||
'''
|
||||
mock = MagicMock(side_effect=[{'StartType': 'Auto'},
|
||||
{'StartType': 'Disabled'}])
|
||||
with patch.object(win_service, 'info', mock):
|
||||
self.assertTrue(win_service.enabled('spongebob test'))
|
||||
self.assertFalse(win_service.enabled('squarepants test'))
|
||||
|
||||
def test_disabled(self):
|
||||
'''
|
||||
Test to check to see if the named
|
||||
|
|
Loading…
Add table
Reference in a new issue