Beispiel #1
0
func (s *TestSuite) TestNewInstanceKeyFromStringsFail(c *C) {
	_, err := inst.NewInstanceKeyFromStrings("127.0.0.1", "3306x")
	c.Assert(err, Not(IsNil))
}
Beispiel #2
0
func (s *TestSuite) TestNewInstanceKeyFromStrings(c *C) {
	i, err := inst.NewInstanceKeyFromStrings("127.0.0.1", "3306")
	c.Assert(err, IsNil)
	c.Assert(i.Hostname, Equals, "127.0.0.1")
	c.Assert(i.Port, Equals, 3306)
}