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
+9
View File
@@ -51,6 +51,9 @@ func TestMain(m *testing.M) {
}
func TestIntegrationParseMetricRequest(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
t.Run("Test a simple single datasource query", func(t *testing.T) {
tc := setup(t, false, nil)
mr := metricRequestWithQueries(t, `{
@@ -272,6 +275,9 @@ func TestIntegrationParseMetricRequest(t *testing.T) {
}
func TestIntegrationQueryDataMultipleSources(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
t.Run("can query multiple datasources", func(t *testing.T) {
tc := setup(t, false, nil)
query1, err := simplejson.NewJson([]byte(`
@@ -455,6 +461,9 @@ func TestIntegrationQueryDataMultipleSources(t *testing.T) {
}
func TestIntegrationQueryDataWithMTDSClient(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
t.Run("can run a simple datasource query with a mt ds client", func(t *testing.T) {
stubbedResponse := &backend.QueryDataResponse{Responses: make(backend.Responses)}
testClient := &testClient{