func (s *BaseSuite) SetUpTest(c *C) { s.job = &TestJob{} sh := core.NewScheduler(&TestLogger{}) e := core.NewExecution() s.ctx = core.NewContext(sh, s.job, e) }
func (c *Config) build() (*core.Scheduler, error) { defaults.SetDefaults(c) d, err := c.buildDockerClient() if err != nil { return nil, err } sh := core.NewScheduler(c.buildLogger()) c.buildSchedulerMiddlewares(sh) for name, j := range c.Jobs { defaults.SetDefaults(j) j.Client = d j.Name = name j.buildMiddlewares() sh.AddJob(j) } return sh, nil }