Exemplo n.º 1
0
func (s *WorkerSuite) TestConfigValidateNothingUsed(c *gc.C) {
	cfg := presence.Config{
		Identity:   names.NewMachineTag("1"),
		Start:      s.start,
		Clock:      coretesting.NewStubClock(s.stub),
		RetryDelay: time.Second,
	}

	err := cfg.Validate()
	c.Assert(err, jc.ErrorIsNil)

	s.stub.CheckNoCalls(c)
}
Exemplo n.º 2
0
func (s *WorkerSuite) SetUpTest(c *gc.C) {
	s.IsolationSuite.SetUpTest(c)

	s.stub = &testing.Stub{}
	s.pinger = &stubPinger{Stub: s.stub}
	s.clock = &stubClock{StubClock: coretesting.NewStubClock(s.stub)}
	s.cfg = presence.Config{
		Identity:   names.NewMachineTag("1"),
		Start:      s.start,
		Clock:      s.clock,
		RetryDelay: time.Nanosecond,
	}
}