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
+11 -15
View File
@@ -30,6 +30,7 @@ import (
"github.com/grafana/grafana/pkg/services/user"
"github.com/grafana/grafana/pkg/tests/testinfra"
"github.com/grafana/grafana/pkg/util"
"github.com/grafana/grafana/pkg/util/testutil"
)
func createRuleWithNotificationSettings(t *testing.T, client apiClient, folder string, nfSettings *definitions.AlertRuleNotificationSettings) (definitions.PostableRuleGroupConfig, string) {
@@ -77,9 +78,8 @@ func createRuleWithNotificationSettings(t *testing.T, client apiClient, folder s
}
func TestIntegrationProvisioning(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testutil.SkipIntegrationTestInShortMode(t)
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -562,9 +562,8 @@ func TestIntegrationProvisioning(t *testing.T) {
}
func TestIntegrationProvisioningRules(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testutil.SkipIntegrationTestInShortMode(t)
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -986,9 +985,8 @@ func createTestRequest(method string, url string, user string, body string) *htt
}
func TestIntegrationExportFileProvision(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testutil.SkipIntegrationTestInShortMode(t)
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -1086,9 +1084,8 @@ func TestIntegrationExportFileProvision(t *testing.T) {
}
func TestIntegrationExportFileProvisionMixed(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testutil.SkipIntegrationTestInShortMode(t)
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -1135,9 +1132,8 @@ func TestIntegrationExportFileProvisionMixed(t *testing.T) {
}
func TestIntegrationExportFileProvisionContactPoints(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testutil.SkipIntegrationTestInShortMode(t)
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,