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
@@ -24,6 +24,7 @@ import (
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/tests/testsuite"
"github.com/grafana/grafana/pkg/util"
"github.com/grafana/grafana/pkg/util/testutil"
)
// This is what the db sets empty time settings to
@@ -42,9 +43,7 @@ func TestLogPrefix(t *testing.T) {
}
func TestIntegrationListPublicDashboard(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
var sqlStore db.DB
var cfg *setting.Cfg
@@ -116,9 +115,8 @@ func TestIntegrationListPublicDashboard(t *testing.T) {
}
func TestIntegrationExistsEnabledByAccessToken(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
var sqlStore db.DB
var cfg *setting.Cfg
var dashboardStore dashboards.Store
@@ -188,9 +186,8 @@ func TestIntegrationExistsEnabledByAccessToken(t *testing.T) {
}
func TestIntegrationExistsEnabledByDashboardUid(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
var sqlStore db.DB
var cfg *setting.Cfg
var dashboardStore dashboards.Store
@@ -252,9 +249,8 @@ func TestIntegrationExistsEnabledByDashboardUid(t *testing.T) {
}
func TestIntegrationFindByDashboardUid(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
var sqlStore db.DB
var cfg *setting.Cfg
var dashboardStore dashboards.Store
@@ -319,9 +315,8 @@ func TestIntegrationFindByDashboardUid(t *testing.T) {
}
func TestIntegrationFindByAccessToken(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
var sqlStore db.DB
var cfg *setting.Cfg
var dashboardStore dashboards.Store
@@ -387,9 +382,8 @@ func TestIntegrationFindByAccessToken(t *testing.T) {
}
func TestIntegrationCreatePublicDashboard(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
var sqlStore db.DB
var cfg *setting.Cfg
var dashboardStore dashboards.Store
@@ -465,9 +459,8 @@ func TestIntegrationCreatePublicDashboard(t *testing.T) {
}
func TestIntegrationUpdatePublicDashboard(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
var sqlStore db.DB
var cfg *setting.Cfg
var dashboardStore dashboards.Store
@@ -569,9 +562,8 @@ func TestIntegrationUpdatePublicDashboard(t *testing.T) {
}
func TestIntegrationGetOrgIdByAccessToken(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
var sqlStore db.DB
var cfg *setting.Cfg
var dashboardStore dashboards.Store
@@ -640,9 +632,8 @@ func TestIntegrationGetOrgIdByAccessToken(t *testing.T) {
}
func TestIntegrationDelete(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
var sqlStore db.DB
var cfg *setting.Cfg
var dashboardStore dashboards.Store
@@ -683,9 +674,8 @@ func TestIntegrationDelete(t *testing.T) {
}
func TestIntegrationDeleteByDashboardUIDs(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testutil.SkipIntegrationTestInShortMode(t)
var sqlStore db.DB
var cfg *setting.Cfg
var dashboardStore dashboards.Store
@@ -736,9 +726,8 @@ func TestIntegrationDeleteByDashboardUIDs(t *testing.T) {
}
func TestIntegrationGetMetrics(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
var sqlStore db.DB
var cfg *setting.Cfg
var dashboardStore dashboards.Store