Chore: Omit integration tests if short test flag is passed (#108777)

* omit integration tests if short test flag is passed

* Update pkg/services/ngalert/models/receivers_test.go

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>

* Update pkg/tests/api/alerting/api_ruler_test.go

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>

* Update pkg/tests/api/alerting/api_ruler_test.go

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>

* Update pkg/tests/api/alerting/api_ruler_test.go

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>

* Update pkg/tests/api/alerting/api_ruler_test.go

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>

* Update pkg/tests/api/alerting/api_ruler_test.go

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>

* Update pkg/services/ngalert/models/receivers_test.go

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>

* Update pkg/cmd/grafana-cli/commands/datamigrations/to_unified_storage_test.go

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>

* Update pkg/services/ngalert/models/receivers_test.go

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>

* fix the rest

* false positive

---------

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
This commit is contained in:
Serge Zaitsev
2025-07-28 13:38:54 +02:00
committed by GitHub
co-authored by Matheus Macabu
parent 1a7a7f1d99
commit a95fb3a37c
103 changed files with 830 additions and 22 deletions
@@ -18,6 +18,9 @@ import (
)
func TestIntegration_AdminApiReencrypt_Enterprise(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
getSecretsFunctions := map[string]func(*testing.T, *server.TestEnv) map[int]secret{}
getSecretsFunctions["settings"] = func(t *testing.T, env *server.TestEnv) map[int]secret {
return getSettingSecrets(t, env.SQLStore)
@@ -28,6 +28,9 @@ func TestMain(m *testing.M) {
}
func TestIntegration_AdminApiReencrypt(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
const (
dataSourceTable = "data_source"
secretsTable = "secrets"
@@ -27,6 +27,9 @@ import (
)
func TestIntegrationAdminConfiguration_SendingToExternalAlertmanagers(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
const disableOrgID int64 = 2
@@ -26,6 +26,9 @@ import (
)
func TestIntegrationSilenceAuth(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -25,6 +25,9 @@ import (
)
func TestIntegrationAMConfigAccess(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -354,6 +357,9 @@ func TestIntegrationAMConfigAccess(t *testing.T) {
}
func TestIntegrationAlertmanagerCreateSilence(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
@@ -504,9 +510,13 @@ func TestIntegrationAlertmanagerCreateSilence(t *testing.T) {
}
func TestIntegrationAlertmanagerStatus(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -16,6 +16,9 @@ import (
)
func TestIntegrationAvailableChannels(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -32,9 +32,13 @@ inhibit_rules:
`
func TestIntegrationConvertPrometheusAlertmanagerEndpoints(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana with alerting import feature flag enabled
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana with alerting import feature flag enabled
dir, gpath := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -333,6 +337,9 @@ receivers:
}
func TestIntegrationConvertPrometheusAlertmanagerEndpoints_FeatureFlagDisabled(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, gpath := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -20,9 +20,13 @@ const (
)
func TestIntegrationConvertPrometheusNotificationSettings(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -106,6 +106,9 @@ var (
)
func TestIntegrationConvertPrometheusEndpoints_RecordingRuleTargetDatasource(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
runTest := func(t *testing.T, enableLokiPaths bool) {
testinfra.SQLiteIntegrationTest(t)
@@ -172,6 +175,9 @@ func TestIntegrationConvertPrometheusEndpoints_RecordingRuleTargetDatasource(t *
}
func TestIntegrationConvertPrometheusEndpoints(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
runTest := func(t *testing.T, enableLokiPaths bool, postContentType string) {
testinfra.SQLiteIntegrationTest(t)
@@ -377,6 +383,9 @@ func TestIntegrationConvertPrometheusEndpoints(t *testing.T) {
}
func TestIntegrationConvertPrometheusEndpoints_UpdateRule(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
runTest := func(t *testing.T, enableLokiPaths bool) {
testinfra.SQLiteIntegrationTest(t)
@@ -457,6 +466,9 @@ func TestIntegrationConvertPrometheusEndpoints_UpdateRule(t *testing.T) {
}
func TestIntegrationConvertPrometheusEndpoints_Conflict(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
runTest := func(t *testing.T, enableLokiPaths bool) {
testinfra.SQLiteIntegrationTest(t)
@@ -538,6 +550,9 @@ func TestIntegrationConvertPrometheusEndpoints_Conflict(t *testing.T) {
}
func TestIntegrationConvertPrometheusEndpoints_CreatePausedRules(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
runTest := func(t *testing.T, enableLokiPaths bool) {
testinfra.SQLiteIntegrationTest(t)
@@ -645,6 +660,9 @@ func TestIntegrationConvertPrometheusEndpoints_CreatePausedRules(t *testing.T) {
}
func TestIntegrationConvertPrometheusEndpoints_FolderUIDHeader(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
runTest := func(t *testing.T, enableLokiPaths bool) {
testinfra.SQLiteIntegrationTest(t)
@@ -741,6 +759,9 @@ func TestIntegrationConvertPrometheusEndpoints_FolderUIDHeader(t *testing.T) {
}
func TestIntegrationConvertPrometheusEndpoints_Provenance(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
runTest := func(t *testing.T, enableLokiPaths bool) {
testinfra.SQLiteIntegrationTest(t)
@@ -850,6 +871,9 @@ func TestIntegrationConvertPrometheusEndpoints_Provenance(t *testing.T) {
}
func TestIntegrationConvertPrometheusEndpoints_Delete(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
runTest := func(t *testing.T, enableLokiPaths bool) {
testinfra.SQLiteIntegrationTest(t)
@@ -1144,6 +1168,9 @@ func TestIntegrationConvertPrometheusEndpoints_Delete(t *testing.T) {
}
func TestIntegrationConvertPrometheusEndpoints_GroupLabels(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, gpath := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -40,6 +40,9 @@ import (
)
func TestIntegrationTestReceivers(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
t.Run("assert no receivers returns 400 Bad Request", func(t *testing.T) {
@@ -544,6 +547,9 @@ func TestIntegrationTestReceivers(t *testing.T) {
}
func TestIntegrationTestReceiversAlertCustomization(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
t.Run("assert custom annotations and labels are sent", func(t *testing.T) {
@@ -831,6 +837,9 @@ func TestIntegrationTestReceiversAlertCustomization(t *testing.T) {
}
func TestIntegrationNotificationChannels(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -31,6 +31,9 @@ import (
var respModel apimodels.UpdateRuleGroupResponse
func TestIntegrationPrometheusRules(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -359,6 +362,9 @@ func TestIntegrationPrometheusRules(t *testing.T) {
}
func TestIntegrationPrometheusRulesFilterByDashboard(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -690,6 +696,9 @@ func TestIntegrationPrometheusRulesFilterByDashboard(t *testing.T) {
}
func TestIntegrationPrometheusRulesPermissions(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -77,6 +77,9 @@ 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")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -559,6 +562,9 @@ func TestIntegrationProvisioning(t *testing.T) {
}
func TestIntegrationProvisioningRules(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -980,6 +986,9 @@ 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")
}
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -1068,6 +1077,9 @@ func TestIntegrationExportFileProvision(t *testing.T) {
}
func TestIntegrationExportFileProvisionMixed(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -1114,6 +1126,9 @@ func TestIntegrationExportFileProvisionMixed(t *testing.T) {
}
func TestIntegrationExportFileProvisionContactPoints(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -18,6 +18,9 @@ import (
// TestIntegrationRemoteAlertmanagerConfigUpload tests that when we post an alertmanager
// configuration to Grafana with remote alertmanager enabled, it gets uploaded to the remote Mimir.
func TestIntegrationRemoteAlertmanagerConfigUpload(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
s, err := alertmanager.NewAlertmanagerScenario()
@@ -133,6 +136,9 @@ receivers:
// a historical alertmanager configuration with extra configs, it gets properly decrypted
// and uploaded to the remote Mimir.
func TestIntegrationRemoteAlertmanagerHistoricalConfigActivation(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
s, err := alertmanager.NewAlertmanagerScenario()
@@ -15,9 +15,13 @@ import (
)
func TestIntegrationAlertRulePauseNamespace(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
+86 -16
View File
@@ -45,9 +45,13 @@ import (
var testData embed.FS
func TestIntegrationAlertRulePermissions(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -349,9 +353,13 @@ func TestIntegrationAlertRulePermissions(t *testing.T) {
}
func TestIntegrationAlertRuleNestedPermissions(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
EnableFeatureToggles: []string{featuremgmt.FlagNestedFolders},
DisableLegacyAlerting: true,
@@ -784,6 +792,9 @@ func TestAlertRulePostExport(t *testing.T) {
}
func TestIntegrationAlertRuleEditorSettings(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
const folderName = "folder1"
@@ -956,9 +967,13 @@ func TestIntegrationAlertRuleEditorSettings(t *testing.T) {
}
func TestIntegrationAlertRuleConflictingTitle(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -1036,6 +1051,9 @@ func TestIntegrationAlertRuleConflictingTitle(t *testing.T) {
}
func TestIntegrationRulerRulesFilterByDashboard(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -1406,9 +1424,13 @@ func TestIntegrationRulerRulesFilterByDashboard(t *testing.T) {
}
func TestIntegrationRuleGroupSequence(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -1512,6 +1534,9 @@ func TestIntegrationRuleGroupSequence(t *testing.T) {
}
func TestIntegrationRuleCreate(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
@@ -1647,9 +1672,13 @@ func TestIntegrationRuleCreate(t *testing.T) {
}
func TestIntegrationRuleUpdate(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -1921,6 +1950,9 @@ func TestIntegrationRuleUpdate(t *testing.T) {
}
func TestIntegrationAlertAndGroupsQuery(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
@@ -2080,9 +2112,13 @@ func TestIntegrationAlertAndGroupsQuery(t *testing.T) {
}
func TestIntegrationRulerAccess(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -2192,9 +2228,13 @@ func TestIntegrationRulerAccess(t *testing.T) {
}
func TestIntegrationEval(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -2472,9 +2512,13 @@ func TestIntegrationEval(t *testing.T) {
}
func TestIntegrationQuota(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -2683,6 +2727,9 @@ func TestIntegrationQuota(t *testing.T) {
}
func TestIntegrationDeleteFolderWithRules(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
opts := testinfra.GrafanaOpts{
@@ -2849,9 +2896,13 @@ func TestIntegrationDeleteFolderWithRules(t *testing.T) {
}
func TestIntegrationAlertRuleCRUD(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -4130,9 +4181,13 @@ func TestIntegrationAlertRuleCRUD(t *testing.T) {
}
func TestIntegrationRulePause(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -4260,9 +4315,13 @@ func TestIntegrationRulePause(t *testing.T) {
}
func TestIntegrationHysteresisRule(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
// Setup Grafana and its Database. Scheduler is set to evaluate every 1 second
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database. Scheduler is set to evaluate every 1 second
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -4334,9 +4393,11 @@ func TestIntegrationHysteresisRule(t *testing.T) {
}
func TestIntegrationRuleNotificationSettings(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database. Scheduler is set to evaluate every 1 second
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -4603,7 +4664,10 @@ func TestIntegrationRuleNotificationSettings(t *testing.T) {
}
func TestIntegrationRuleUpdateAllDatabases(t *testing.T) {
// Setup Grafana and its Database
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -4655,9 +4719,11 @@ func TestIntegrationRuleUpdateAllDatabases(t *testing.T) {
}
func TestIntegrationRuleVersions(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -4745,9 +4811,11 @@ func TestIntegrationRuleVersions(t *testing.T) {
}
func TestIntegrationRuleSoftDelete(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -4856,9 +4924,11 @@ func TestIntegrationRuleSoftDelete(t *testing.T) {
}
func TestIntegrationRulePermanentlyDelete(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
+3
View File
@@ -26,6 +26,9 @@ func TestMain(m *testing.M) {
}
func TestIntegrationAdminStats(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
t.Run("with unified alerting enabled", func(t *testing.T) {
url := grafanaSetup(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,