Fixing failing test, integration.modules.test_service.ServiceModuleTest.test_service_disable_doesnot_exist, on Debian 8 and higher.

This commit is contained in:
Gareth J. Greenaway 2018-08-03 16:39:11 -07:00
parent 0c3d2c6a09
commit 280d1d2ad2
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41

View file

@ -127,6 +127,8 @@ class ServiceModuleTest(ModuleCase):
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
self.assertTrue(self.run_function('service.disable', [srv_name]))
elif self.run_function('grains.item', ['osfullname'])['osfullname'] == 'Debian' and systemd:
self.assertTrue(self.run_function('service.disable', [srv_name]))
else:
try:
disable = self.run_function('service.disable', [srv_name])