Replace remaining calls to testing.Short where possible. (#110765)

* Replace remaining calls to testing.Short where possible.
* Update style guide.
* Revert change in TestAlertmanager_ExtraDedupStage, as it doesn't work.
* Make TestAlertRulePostExport into integration test.
This commit is contained in:
Peter Štibraný
2025-09-09 08:16:12 +00:00
committed by GitHub
parent ffcc0e8de0
commit c32650e9d8
16 changed files with 76 additions and 88 deletions
+1 -1
View File
@@ -711,7 +711,7 @@ func TestIntegrationAlertRuleNestedPermissions(t *testing.T) {
})
}
func TestAlertRulePostExport(t *testing.T) {
func TestIntegrationAlertRulePostExport(t *testing.T) {
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
+6 -4
View File
@@ -8,6 +8,7 @@ import (
"github.com/grafana/grafana-openapi-client-go/client/folders"
"github.com/grafana/grafana-openapi-client-go/models"
"github.com/grafana/grafana/pkg/services/accesscontrol/resourcepermissions"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/folder"
@@ -17,6 +18,8 @@ import (
"github.com/grafana/grafana/pkg/tests/testinfra"
"github.com/grafana/grafana/pkg/tests/testsuite"
"github.com/grafana/grafana/pkg/util/retryer"
"github.com/grafana/grafana/pkg/util/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -25,10 +28,9 @@ func TestMain(m *testing.M) {
testsuite.Run(m)
}
func TestGetFolders(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
func TestIntegrationGetFolders(t *testing.T) {
testutil.SkipIntegrationTestInShortMode(t)
// Setup Grafana and its Database
dir, p := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,