Change testing.Short() check with SkipIntegrationTestInShortMode check. (#112442)

* Change testing.Short() check with SkipIntegrationTestInShortMode check.
This commit is contained in:
Peter Štibraný
2025-10-20 09:40:38 +02:00
committed by GitHub
parent 891d5f0625
commit 7604653fd8
8 changed files with 26 additions and 62 deletions
@@ -13,15 +13,14 @@ import (
"github.com/grafana/grafana/pkg/tests/api/alerting"
"github.com/grafana/grafana/pkg/tests/apis/alerting/rules/common"
"github.com/grafana/grafana/pkg/util"
"github.com/grafana/grafana/pkg/util/testutil"
prom_model "github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func TestIntegrationAlertRuleCompatCreateViaK8s(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
ctx := context.Background()
helper := common.GetTestHelper(t)
@@ -145,9 +144,7 @@ func TestIntegrationAlertRuleCompatCreateViaK8s(t *testing.T) {
}
func TestIntegrationAlertRuleCompatCreateViaProvisioning(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
ctx := context.Background()
helper := common.GetTestHelper(t)
@@ -287,9 +284,7 @@ func TestIntegrationAlertRuleCompatCreateViaProvisioning(t *testing.T) {
}
func TestIntegrationAlertRuleCompatCreateViaProvisioningChangeGroupInK8s(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
ctx := context.Background()
helper := common.GetTestHelper(t)
@@ -14,6 +14,7 @@ import (
"github.com/grafana/grafana/pkg/tests/apis/alerting/rules/common"
"github.com/grafana/grafana/pkg/tests/testsuite"
"github.com/grafana/grafana/pkg/util"
"github.com/grafana/grafana/pkg/util/testutil"
prom_model "github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -24,9 +25,7 @@ func TestMain(m *testing.M) {
}
func TestIntegrationRecordingRuleCompatCreateViaK8s(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
ctx := context.Background()
helper := common.GetTestHelper(t)
@@ -152,9 +151,7 @@ func TestIntegrationRecordingRuleCompatCreateViaK8s(t *testing.T) {
}
func TestIntegrationRecordingRuleCompatCreateViaProvisioning(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
ctx := context.Background()
helper := common.GetTestHelper(t)
@@ -296,9 +293,7 @@ func TestIntegrationRecordingRuleCompatCreateViaProvisioning(t *testing.T) {
}
func TestIntegrationRecordingRuleCompatCreateViaProvisioningChangeGroupInK8s(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
testutil.SkipIntegrationTestInShortMode(t)
ctx := context.Background()
helper := common.GetTestHelper(t)