github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/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 = (*ApplicationInfo)(nil)
    16  	_ EntityInfo = (*RemoteApplicationInfo)(nil)
    17  	_ EntityInfo = (*ApplicationOfferInfo)(nil)
    18  	_ EntityInfo = (*UnitInfo)(nil)
    19  	_ EntityInfo = (*RelationInfo)(nil)
    20  	_ EntityInfo = (*AnnotationInfo)(nil)
    21  	_ EntityInfo = (*BlockInfo)(nil)
    22  	_ EntityInfo = (*ActionInfo)(nil)
    23  	_ EntityInfo = (*ModelInfo)(nil)
    24  )
    25  
    26  type ConstantsSuite struct{}
    27  
    28  var _ = gc.Suite(&ConstantsSuite{})
    29  
    30  func TestPackage(t *testing.T) {
    31  	gc.TestingT(t)
    32  }
    33  
    34  func (s *ConstantsSuite) TestAnyJobNeedsState(c *gc.C) {
    35  	c.Assert(AnyJobNeedsState(), jc.IsFalse)
    36  	c.Assert(AnyJobNeedsState(JobHostUnits), jc.IsFalse)
    37  	c.Assert(AnyJobNeedsState(JobManageModel), jc.IsTrue)
    38  	c.Assert(AnyJobNeedsState(JobHostUnits, JobManageModel), jc.IsTrue)
    39  }