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:
Dan Cech authored and GitHub committed 2024-02-09 09:35:39 -05:00
1 parent de4acb27ce
commit 790e1feb93
104 files changed
+801 -189

No files matched your search

@@ -15,8 +15,14 @@ import (
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/services/tag/tagimpl"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/tests/testsuite"
)
// run tests with cleanup
func TestMain(m *testing.M) {
testsuite.Run(m)
}
func TestIntegrationDashboardFolderStore(t *testing.T) {
var sqlStore *sqlstore.SQLStore
var cfg *setting.Cfg