func (*PrecheckSuite) TestPrecheckCleanupsError(c *gc.C) { backend := &fakePrecheckBackend{ cleanupError: errors.New("boom"), } err := migration.Precheck(backend) c.Assert(err, gc.ErrorMatches, "precheck cleanups: boom") }
func (*PrecheckSuite) TestPrecheckCleanupsNeeded(c *gc.C) { backend := &fakePrecheckBackend{ cleanupNeeded: true, } err := migration.Precheck(backend) c.Assert(err, gc.ErrorMatches, "precheck failed: cleanup needed") }
func (*PrecheckSuite) TestPrecheckCleanups(c *gc.C) { backend := &fakePrecheckBackend{} err := migration.Precheck(backend) c.Assert(err, jc.ErrorIsNil) }