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
+5 -9
View File
@@ -26,6 +26,7 @@ import (
"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/testutil"
)
func TestMain(m *testing.M) {
@@ -33,9 +34,7 @@ func TestMain(m *testing.M) {
}
func TestIntegrationUserDataAccess(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
ss, cfg := db.InitTestDBWithCfg(t)
cfgProvider, err := configprovider.ProvideService(cfg)
@@ -998,9 +997,7 @@ func TestIntegrationUserDataAccess(t *testing.T) {
}
func TestIntegrationUserUpdate(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
ss, cfg := db.InitTestDBWithCfg(t)
userStore := ProvideStore(ss, cfg)
@@ -1067,9 +1064,8 @@ func createFiveTestUsers(t *testing.T, svc user.Service, fn func(i int) *user.Cr
}
func TestIntegrationMetricsUsage(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testutil.SkipIntegrationTestInShortMode(t)
ss, cfg := db.InitTestDBWithCfg(t)
userStore := ProvideStore(ss, setting.NewCfg())
cfgProvider, err := configprovider.ProvideService(cfg)
+2 -3
View File
@@ -18,6 +18,7 @@ import (
"github.com/grafana/grafana/pkg/services/team/teamtest"
"github.com/grafana/grafana/pkg/services/user"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/util/testutil"
)
func TestUserService(t *testing.T) {
@@ -270,9 +271,7 @@ func TestMetrics(t *testing.T) {
}
func TestIntegrationCreateUser(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
cfg := setting.NewCfg()
ss := db.InitTestDB(t)