示例#1
0
 def test_start_with_relationship(self):
     self.is_relation_made.return_value = True
     self.service_running.return_value = False
     hooks.start()
     self.apply_playbook.assert_called_with(hooks.playbook, tags=['start'])
     self.status_set.assert_called_with(hooks.status_maintenance,
                                        hooks.msg_service_failed_to_start)
示例#2
0
 def test_start_without_relationship(self):
     self.is_relation_made.return_value = False
     hooks.start()
     self.apply_playbook.assert_not_called()
     self.status_set.assert_called_with(hooks.status_blocked,
                                        hooks.msg_missing_es_rel)
示例#3
0
 def test_start_runs_service(self):
     hooks.start()
     host.service.assert_called_with('restart', 'beaver')
示例#4
0
 def test_start_does_not_raise(self):
     hooks.start()
示例#5
0
 def test_start_runs_service(self):
     hooks.start()
     host.service.assert_called_with('restart', 'beaver')
示例#6
0
 def test_start_does_not_raise(self):
     hooks.start()
示例#7
0
 def test_start(self):
     ceph_hooks.start()
     cmd = ['service', 'radosgw', 'start']
     self.subprocess.call.assert_called_with(cmd)
示例#8
0
 def test_start(self):
     ceph_hooks.start()
     cmd = ['service', 'radosgw', 'start']
     self.subprocess.call.assert_called_with(cmd)