Chore: Update test database initialization (#81673)
* streamline initialization of test databases, support on-disk sqlite test db * clean up test databases * introduce testsuite helper * use testsuite everywhere we use a test db * update documentation * improve error handling * disable entity integration test until we can figure out locking error
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package testsuite
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana/pkg/infra/db"
|
||||
)
|
||||
|
||||
func Run(m *testing.M) {
|
||||
db.SetupTestDB()
|
||||
code := m.Run()
|
||||
db.CleanupTestDB()
|
||||
os.Exit(code)
|
||||
}
|
||||
Reference in New Issue
Block a user