mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 03:12:13 +08:00
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:
@ -191,10 +191,6 @@ func TestIntegrationPostgres(t *testing.T) {
|
||||
return sql
|
||||
}
|
||||
|
||||
cfg := setting.NewCfg()
|
||||
cfg.DataPath = t.TempDir()
|
||||
cfg.DataProxyRowLimit = 10000
|
||||
|
||||
jsonData := sqleng.JsonData{
|
||||
MaxOpenConns: 0,
|
||||
MaxIdleConns: 2,
|
||||
@ -212,7 +208,7 @@ func TestIntegrationPostgres(t *testing.T) {
|
||||
|
||||
cnnstr := postgresTestDBConnString()
|
||||
|
||||
db, exe, err := newPostgres(context.Background(), cfg, dsInfo, cnnstr, logger, backend.DataSourceInstanceSettings{})
|
||||
db, exe, err := newPostgres(context.Background(), "error", 10000, dsInfo, cnnstr, logger, backend.DataSourceInstanceSettings{})
|
||||
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -1266,9 +1262,7 @@ func TestIntegrationPostgres(t *testing.T) {
|
||||
|
||||
t.Run("When row limit set to 1", func(t *testing.T) {
|
||||
dsInfo := sqleng.DataSourceInfo{}
|
||||
conf := setting.NewCfg()
|
||||
conf.DataProxyRowLimit = 1
|
||||
_, handler, err := newPostgres(context.Background(), conf, dsInfo, cnnstr, logger, backend.DataSourceInstanceSettings{})
|
||||
_, handler, err := newPostgres(context.Background(), "error", 1, dsInfo, cnnstr, logger, backend.DataSourceInstanceSettings{})
|
||||
|
||||
require.NoError(t, err)
|
||||
|
||||
|
Reference in New Issue
Block a user