Use gorm connection pool
This commit is contained in:
parent
31ea67bcaf
commit
ff9d99b9ea
15 changed files with 50 additions and 167 deletions
|
@ -16,11 +16,6 @@ func (s *Suite) TestGetRoutes(c *check.C) {
|
|||
pak, err := h.CreatePreAuthKey(n.Name, false, false, nil)
|
||||
c.Assert(err, check.IsNil)
|
||||
|
||||
db, err := h.db()
|
||||
if err != nil {
|
||||
c.Fatal(err)
|
||||
}
|
||||
|
||||
_, err = h.GetMachine("test", "testmachine")
|
||||
c.Assert(err, check.NotNil)
|
||||
|
||||
|
@ -45,7 +40,7 @@ func (s *Suite) TestGetRoutes(c *check.C) {
|
|||
AuthKeyID: uint(pak.ID),
|
||||
HostInfo: datatypes.JSON(hostinfo),
|
||||
}
|
||||
db.Save(&m)
|
||||
h.db.Save(&m)
|
||||
|
||||
r, err := h.GetNodeRoutes("test", "testmachine")
|
||||
c.Assert(err, check.IsNil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue