func (s *TestSuite) TestFailBeginMaintenanceTwice(c *C) { clearTestMaintenance() _, _ = inst.ReadTopologyInstance(&masterKey) _, err := inst.BeginMaintenance(&masterKey, "unittest", "TestFailBeginMaintenanceTwice") c.Assert(err, IsNil) _, err = inst.BeginMaintenance(&masterKey, "unittest", "TestFailBeginMaintenanceTwice") c.Assert(err, Not(IsNil)) }
func (s *TestSuite) TestBeginEndMaintenance(c *C) { clearTestMaintenance() _, _ = inst.ReadTopologyInstance(&masterKey) k, err := inst.BeginMaintenance(&masterKey, "unittest", "TestBeginEndMaintenance") c.Assert(err, IsNil) err = inst.EndMaintenance(k) c.Assert(err, IsNil) }
func (s *TestSuite) TestFailMoveBelowUponMaintenance(c *C) { clearTestMaintenance() _, _ = inst.ReadTopologyInstance(&slave1Key) k, err := inst.BeginMaintenance(&slave1Key, "unittest", "TestBeginEndMaintenance") c.Assert(err, IsNil) _, err = inst.MoveBelow(&slave1Key, &slave2Key) c.Assert(err, Not(IsNil)) err = inst.EndMaintenance(k) c.Assert(err, IsNil) }