mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 10:20:29 -06:00
postgres: test: remove unused code (#81330)
This commit is contained in:
parent
722b78f3e0
commit
7230ec88a1
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user