func (s *MachineSuite) assertJobWithState( c *gc.C, job state.MachineJob, test func(agent.Config, *state.State), ) { paramsJob := job.ToParams() if !paramsJob.NeedsState() { c.Fatalf("%v does not use state", paramsJob) } s.assertAgentOpensState(c, job, test) }
func (s *MachineSuite) assertJobWithState( c *gc.C, job state.MachineJob, test func(agent.Config, *state.State), ) { paramsJob := job.ToParams() if !paramsJob.NeedsState() { c.Fatalf("%v does not use state", paramsJob) } s.assertAgentOpensState(c, &reportOpenedState, job, func(cfg agent.Config, st eitherState) { test(cfg, st.(*state.State)) }) }