Use gorm connection pool
This commit is contained in:
parent
31ea67bcaf
commit
ff9d99b9ea
15 changed files with 50 additions and 167 deletions
|
@ -11,11 +11,6 @@ func (s *Suite) TestGetMachine(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)
|
||||
|
||||
|
@ -30,7 +25,7 @@ func (s *Suite) TestGetMachine(c *check.C) {
|
|||
RegisterMethod: "authKey",
|
||||
AuthKeyID: uint(pak.ID),
|
||||
}
|
||||
db.Save(&m)
|
||||
h.db.Save(&m)
|
||||
|
||||
m1, err := h.GetMachine("test", "testmachine")
|
||||
c.Assert(err, check.IsNil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue