示例#1
0
文件: pinger_test.go 项目: makyo/juju
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)
}
示例#2
0
文件: pinger_test.go 项目: makyo/juju
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,
	}
}