mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
fix: return Sql() method to SqlDb type for dredd tests
This commit is contained in:
parent
dafd619134
commit
c16406c924
@ -4,7 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/ansible-semaphore/semaphore/db"
|
||||
"github.com/ansible-semaphore/semaphore/db/factory"
|
||||
"github.com/ansible-semaphore/semaphore/db/sql"
|
||||
"github.com/ansible-semaphore/semaphore/util"
|
||||
"github.com/snikch/goodman/transaction"
|
||||
"math/rand"
|
||||
@ -209,10 +209,10 @@ func loadConfig() {
|
||||
}
|
||||
}
|
||||
|
||||
var store db.Store
|
||||
var store sql.SqlDb
|
||||
|
||||
func dbConnect() {
|
||||
store = factory.CreateStore()
|
||||
store = sql.SqlDb{}
|
||||
|
||||
if err := store.Connect(); err != nil {
|
||||
panic(err)
|
||||
|
@ -400,7 +400,8 @@ func getSqlForTable(tableName string, p db.RetrieveQueryParams) (string, []inter
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
func (d *SqlDb) Sql() *gorp.DbMap {
|
||||
return d.sql
|
||||
}
|
||||
|
||||
|
||||
|
2
go.mod
2
go.mod
@ -39,7 +39,7 @@ require (
|
||||
github.com/radovskyb/watcher v1.0.7 // indirect
|
||||
github.com/russross/blackfriday v1.5.2
|
||||
github.com/sirupsen/logrus v1.4.2 // indirect
|
||||
github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa // indirect
|
||||
github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa
|
||||
github.com/spf13/cobra v0.0.5 // indirect
|
||||
github.com/ziutek/mymysql v1.5.4 // indirect
|
||||
go.etcd.io/bbolt v1.3.2
|
||||
|
Loading…
Reference in New Issue
Block a user