github.com/cloud-green/juju@v0.0.0-20151002100041-a00291338d3d/state/multiwatcher/multiwatcher_internal_test.go (about) 1 // Copyright 2013 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package multiwatcher 5 6 import ( 7 "testing" 8 9 jc "github.com/juju/testing/checkers" 10 gc "gopkg.in/check.v1" 11 ) 12 13 var ( 14 _ EntityInfo = (*MachineInfo)(nil) 15 _ EntityInfo = (*ServiceInfo)(nil) 16 _ EntityInfo = (*UnitInfo)(nil) 17 _ EntityInfo = (*RelationInfo)(nil) 18 _ EntityInfo = (*AnnotationInfo)(nil) 19 _ EntityInfo = (*BlockInfo)(nil) 20 _ EntityInfo = (*ActionInfo)(nil) 21 _ EntityInfo = (*EnvironmentInfo)(nil) 22 ) 23 24 type ConstantsSuite struct{} 25 26 var _ = gc.Suite(&ConstantsSuite{}) 27 28 func TestPackage(t *testing.T) { 29 gc.TestingT(t) 30 } 31 32 func (s *ConstantsSuite) TestAnyJobNeedsState(c *gc.C) { 33 c.Assert(AnyJobNeedsState(), jc.IsFalse) 34 c.Assert(AnyJobNeedsState(JobHostUnits), jc.IsFalse) 35 c.Assert(AnyJobNeedsState(JobManageNetworking), jc.IsFalse) 36 c.Assert(AnyJobNeedsState(JobManageStateDeprecated), jc.IsFalse) 37 c.Assert(AnyJobNeedsState(JobManageEnviron), jc.IsTrue) 38 c.Assert(AnyJobNeedsState(JobHostUnits, JobManageEnviron), jc.IsTrue) 39 }