示例#1
0
func (s *StateWorkersSuite) TestNoStartStateWorkers(c *gc.C) {
	manifold := machine.StateWorkersManifold(machine.StateWorkersConfig{})
	worker, err := manifold.Start(dt.StubGetResource(nil))
	c.Check(worker, gc.IsNil)
	c.Check(err, gc.ErrorMatches, "StartStateWorkers not specified")
	c.Check(s.startCalled, jc.IsFalse)
}
示例#2
0
func (s *StateWorkersSuite) SetUpTest(c *gc.C) {
	s.startError = nil
	s.startCalled = false
	s.manifold = machine.StateWorkersManifold(machine.StateWorkersConfig{
		StateName:         "state",
		StartStateWorkers: s.startStateWorkers,
	})
}