mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #48962 from garethgreenaway/1022_test_service_disable_debian_part_deux
[2017.7] Fixing tests/integration/modules/test_service.py
This commit is contained in:
commit
79994ecab4
@ -127,7 +127,10 @@ class ServiceModuleTest(ModuleCase):
|
|||||||
if tuple(self.run_function('grains.item', ['osrelease_info'])['osrelease_info']) == (14, 0o4) and not systemd:
|
if tuple(self.run_function('grains.item', ['osrelease_info'])['osrelease_info']) == (14, 0o4) and not systemd:
|
||||||
# currently upstart does not have a mechanism to report if disabling a service fails if does not exist
|
# 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]))
|
self.assertTrue(self.run_function('service.disable', [srv_name]))
|
||||||
elif self.run_function('grains.item', ['osfullname'])['osfullname'] == 'Debian' and systemd:
|
elif self.run_function('grains.item', ['osfullname'])['osfullname'] == 'Debian' and \
|
||||||
|
self.run_function('grains.item', ['osmajorrelease'])['osmajorrelease'] < 9 and systemd:
|
||||||
|
# currently disabling a service via systemd that does not exist
|
||||||
|
# on Debian 8 results in a True return code
|
||||||
self.assertTrue(self.run_function('service.disable', [srv_name]))
|
self.assertTrue(self.run_function('service.disable', [srv_name]))
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user