diff --git a/pkg/tsdb/grafana-postgresql-datasource/postgres_test.go b/pkg/tsdb/grafana-postgresql-datasource/postgres_test.go index 54bb31e1f38..7a37b839150 100644 --- a/pkg/tsdb/grafana-postgresql-datasource/postgres_test.go +++ b/pkg/tsdb/grafana-postgresql-datasource/postgres_test.go @@ -2,7 +2,6 @@ package postgres import ( "context" - "database/sql" "fmt" "math/rand" "os" @@ -1371,17 +1370,6 @@ func TestIntegrationPostgres(t *testing.T) { }) } -func InitPostgresTestDB(t *testing.T, jsonData sqleng.JsonData) *sql.DB { - connStr := postgresTestDBConnString() - db, err := sql.Open("postgres", connStr) - require.NoError(t, err, "Failed to init postgres DB") - - db.SetMaxOpenConns(jsonData.MaxOpenConns) - db.SetMaxIdleConns(jsonData.MaxIdleConns) - db.SetConnMaxLifetime(time.Duration(jsonData.ConnMaxLifetime) * time.Second) - return db -} - func genTimeRangeByInterval(from time.Time, duration time.Duration, interval time.Duration) []time.Time { durationSec := int64(duration.Seconds()) intervalSec := int64(interval.Seconds())