def test_resumes_a_stopped_systemd_unit(self, service, systemd,
service_running):
"""Resume on a stopped systemd unit will be started and enabled."""
service_name = 'foo-service'
service_running.return_value = False
systemd.return_value = True
self.assertTrue(host.service_resume(service_name))
service.assert_has_calls([
call('unmask', service_name),
# Ensures a package starts up if disabled but not masked,
# per lp:1692178
call('enable', service_name),
call('start', service_name)])
评论列表
文章目录