postgres: do not use unexported grafana-core config (#83241)

* postgres: do not use unexported grafana-core config

* fixed wrong value
This commit is contained in:
Gábor Farkas
2024-02-22 16:47:03 +01:00
committed by GitHub
parent 5f89c69b66
commit ae77fe3602
3 changed files with 24 additions and 25 deletions

View File

@ -16,7 +16,6 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/experimental"
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/tsdb/sqleng"
_ "github.com/lib/pq"
@ -143,10 +142,6 @@ func TestIntegrationPostgresSnapshots(t *testing.T) {
return sql
}
cfg := setting.NewCfg()
cfg.DataPath = t.TempDir()
cfg.DataProxyRowLimit = 10000
jsonData := sqleng.JsonData{
MaxOpenConns: 0,
MaxIdleConns: 2,
@ -164,7 +159,7 @@ func TestIntegrationPostgresSnapshots(t *testing.T) {
cnnstr := getCnnStr()
db, handler, err := newPostgres(context.Background(), cfg, dsInfo, cnnstr, logger, backend.DataSourceInstanceSettings{})
db, handler, err := newPostgres(context.Background(), "error", 10000, dsInfo, cnnstr, logger, backend.DataSourceInstanceSettings{})
t.Cleanup((func() {
_, err := db.Exec("DROP TABLE tbl")