github.com/axw/juju@v0.0.0-20161005053422-4bd6544d08d4/core/migration/minionreports_test.go (about) 1 // Copyright 2016 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package migration_test 5 6 import ( 7 jc "github.com/juju/testing/checkers" 8 gc "gopkg.in/check.v1" 9 10 "github.com/juju/juju/core/migration" 11 coretesting "github.com/juju/juju/testing" 12 ) 13 14 type MinionReportsSuite struct { 15 coretesting.BaseSuite 16 } 17 18 var _ = gc.Suite(new(MinionReportsSuite)) 19 20 func (s *MinionReportsSuite) TestIsZero(c *gc.C) { 21 reports := migration.MinionReports{} 22 c.Check(reports.IsZero(), jc.IsTrue) 23 } 24 25 func (s *MinionReportsSuite) TestIsZeroIdSet(c *gc.C) { 26 reports := migration.MinionReports{ 27 MigrationId: "foo", 28 } 29 c.Check(reports.IsZero(), jc.IsFalse) 30 } 31 32 func (s *MinionReportsSuite) TestIsZeroPhaseSet(c *gc.C) { 33 reports := migration.MinionReports{ 34 Phase: migration.QUIESCE, 35 } 36 c.Check(reports.IsZero(), jc.IsFalse) 37 }