Change testing.Short() check with SkipIntegrationTestInShortMode check. (#112442)
* Change testing.Short() check with SkipIntegrationTestInShortMode check.
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/grafana/grafana/pkg/tsdb/grafana-postgresql-datasource/sqleng"
|
||||
"github.com/grafana/grafana/pkg/util/testutil"
|
||||
)
|
||||
|
||||
// These tests require a real postgres database:
|
||||
@@ -28,12 +29,10 @@ import (
|
||||
// Use the docker/blocks/postgres_tests/docker-compose.yaml to spin up a
|
||||
// preconfigured Postgres server suitable for running these tests.
|
||||
func TestIntegrationPostgresPGXSnapshots(t *testing.T) {
|
||||
testutil.SkipIntegrationTestInShortMode(t)
|
||||
|
||||
// the logic in this function is copied from postgres_tests.go
|
||||
shouldRunTest := func() bool {
|
||||
if testing.Short() {
|
||||
return false
|
||||
}
|
||||
|
||||
testDbName, present := os.LookupEnv("GRAFANA_TEST_DB")
|
||||
|
||||
if present && testDbName == "postgres" {
|
||||
|
||||
@@ -35,10 +35,6 @@ func TestIntegrationPostgresSnapshots(t *testing.T) {
|
||||
|
||||
// the logic in this function is copied from postgres_tests.go
|
||||
shouldRunTest := func() bool {
|
||||
if testing.Short() {
|
||||
return false
|
||||
}
|
||||
|
||||
testDbName, present := os.LookupEnv("GRAFANA_TEST_DB")
|
||||
|
||||
if present && testDbName == "postgres" {
|
||||
|
||||
Reference in New Issue
Block a user