mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
fix(dredd): do not clean postgres db
This commit is contained in:
parent
23e6402d31
commit
16ce9b80a1
@ -8,6 +8,7 @@ import (
|
||||
"github.com/ansible-semaphore/semaphore/db/factory"
|
||||
"github.com/ansible-semaphore/semaphore/db/sql"
|
||||
"github.com/ansible-semaphore/semaphore/util"
|
||||
"github.com/go-gorp/gorp/v3"
|
||||
"github.com/snikch/goodman/transaction"
|
||||
"math/rand"
|
||||
"os"
|
||||
@ -64,6 +65,10 @@ func truncateAll() {
|
||||
case *bolt.BoltDb:
|
||||
// Do nothing
|
||||
case *sql.SqlDb:
|
||||
switch store.(*sql.SqlDb).Sql().Dialect.(type) {
|
||||
case gorp.PostgresDialect:
|
||||
// Do nothing
|
||||
case gorp.MySQLDialect:
|
||||
tx, err := store.(*sql.SqlDb).Sql().Begin()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@ -82,6 +87,7 @@ func truncateAll() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func removeTestRunnerUser(transactions []*transaction.Transaction) {
|
||||
dbConnect()
|
||||
|
Loading…
Reference in New Issue
Block a user