Replace check for integration tests. (#110707)

* Replace check for integration tests.
* Revert changes in pkg/tsdb/mysql packages.
* Fix formatting of few tests.
This commit is contained in:
Peter Štibraný
2025-09-08 15:49:49 +02:00
committed by GitHub
parent 544872d117
commit 7fd9ab9481
218 changed files with 1130 additions and 1630 deletions
@@ -27,6 +27,7 @@ import (
"github.com/grafana/grafana/pkg/services/user"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/util"
"github.com/grafana/grafana/pkg/util/testutil"
)
var folderTitle string = "folder1"
@@ -34,9 +35,7 @@ var folderDsc string = "folder desc"
var usr = &user.SignedInUser{UserID: 1, OrgID: orgID, Permissions: map[int64]map[string][]string{orgID: {dashboards.ActionFoldersCreate: {dashboards.ScopeFoldersProvider.GetResourceScopeUID(folder.GeneralFolderUID)}}}}
func TestIntegrationCreate(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
db, cfg := sqlstore.InitTestDB(t)
folderStore := ProvideStore(db)
@@ -166,9 +165,7 @@ func TestIntegrationCreate(t *testing.T) {
}
func TestIntegrationDelete(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
db, cfg := sqlstore.InitTestDB(t)
folderStore := ProvideStore(db)
@@ -213,9 +210,7 @@ func TestIntegrationDelete(t *testing.T) {
}
func TestIntegrationUpdate(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
db, cfg := sqlstore.InitTestDB(t)
folderStore := ProvideStore(db)
@@ -388,9 +383,7 @@ func TestIntegrationUpdate(t *testing.T) {
}
func TestIntegrationGet(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
db, cfg := sqlstore.InitTestDB(t)
folderStore := ProvideStore(db)
@@ -523,9 +516,7 @@ func TestIntegrationGet(t *testing.T) {
}
func TestIntegrationGetParents(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
db, cfg := sqlstore.InitTestDB(t)
folderStore := ProvideStore(db)
@@ -591,9 +582,7 @@ func TestIntegrationGetParents(t *testing.T) {
}
func TestIntegrationGetChildren(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
db, cfg := sqlstore.InitTestDB(t)
folderStore := ProvideStore(db)
@@ -826,9 +815,7 @@ func TestIntegrationGetChildren(t *testing.T) {
}
func TestIntegrationGetHeight(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
db, cfg := sqlstore.InitTestDB(t)
folderStore := ProvideStore(db)
@@ -858,9 +845,7 @@ func TestIntegrationGetHeight(t *testing.T) {
}
func TestIntegrationGetFolders(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
foldersNum := 10
db, cfg := sqlstore.InitTestDB(t)