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:
@@ -24,6 +24,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/services/tag/tagimpl"
|
||||
"github.com/grafana/grafana/pkg/services/user"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/grafana/grafana/pkg/tests/testsuite"
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
)
|
||||
|
||||
@@ -33,6 +34,11 @@ var DefaultTimeSettings = &TimeSettings{}
|
||||
// Default time to pass in with seconds rounded
|
||||
var DefaultTime = time.Now().UTC().Round(time.Second)
|
||||
|
||||
// run tests with cleanup
|
||||
func TestMain(m *testing.M) {
|
||||
testsuite.Run(m)
|
||||
}
|
||||
|
||||
func TestLogPrefix(t *testing.T) {
|
||||
assert.Equal(t, LogPrefix, "publicdashboards.store")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user