Move SkipIntegrationTestInShortMode to testutil. (#110750)

* Move SkipIntegrationTestInShortMode to testutil.

* make update-workspace
This commit is contained in:
Peter Štibraný
2025-09-08 12:50:31 +02:00
committed by GitHub
parent 08230cbc09
commit d09708fe55
7 changed files with 23 additions and 32 deletions
@@ -17,7 +17,7 @@ import (
"github.com/grafana/grafana/pkg/storage/unified/sql"
"github.com/grafana/grafana/pkg/storage/unified/sql/db/dbimpl"
test "github.com/grafana/grafana/pkg/storage/unified/testing"
"github.com/grafana/grafana/pkg/tests"
"github.com/grafana/grafana/pkg/util/testutil"
)
func newTestBackend(b testing.TB) resource.StorageBackend {
@@ -39,10 +39,7 @@ func newTestBackend(b testing.TB) resource.StorageBackend {
}
func TestIntegrationBenchmarkSQLStorageBackend(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
tests.SkipIntegrationTestInShortMode(t)
testutil.SkipIntegrationTestInShortMode(t)
opts := test.DefaultBenchmarkOptions()
if db.IsTestDbSQLite() {
opts.Concurrency = 1 // to avoid SQLite database is locked error
@@ -53,10 +50,7 @@ func TestIntegrationBenchmarkSQLStorageBackend(t *testing.T) {
func TestIntegrationBenchmarkResourceServer(t *testing.T) {
t.Skip("skipping slow test, causing CI to fail due to timeout")
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
tests.SkipIntegrationTestInShortMode(t)
testutil.SkipIntegrationTestInShortMode(t)
ctx := context.Background()
opts := &test.BenchmarkOptions{
@@ -26,7 +26,6 @@ import (
"github.com/grafana/grafana/pkg/storage/unified/sql"
"github.com/grafana/grafana/pkg/storage/unified/sql/db/dbimpl"
unitest "github.com/grafana/grafana/pkg/storage/unified/testing"
"github.com/grafana/grafana/pkg/tests"
"github.com/grafana/grafana/pkg/tests/testsuite"
"github.com/grafana/grafana/pkg/util/testutil"
)
@@ -102,10 +101,7 @@ func TestIntegrationSQLStorageBackend(t *testing.T) {
}
func TestIntegrationSearchAndStorage(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test in short mode")
}
tests.SkipIntegrationTestInShortMode(t)
testutil.SkipIntegrationTestInShortMode(t)
ctx := context.Background()