mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
SQLStore: Fix setting query tries for integration tests (#64944)
* SQLStore: Pass testinfra database configuration to the test database * Add test * Bypass gocyclo check for initTestDB
This commit is contained in:
committed by
GitHub
parent
7261c6f7cd
commit
f5cb8c660e
@@ -53,6 +53,11 @@ func StartGrafanaEnv(t *testing.T, grafDir, cfgPath string) (string, *server.Tes
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, env.SQLStore.Sync())
|
||||
|
||||
require.NotNil(t, env.SQLStore.Cfg)
|
||||
dbSec, err := env.SQLStore.Cfg.Raw.GetSection("database")
|
||||
require.NoError(t, err)
|
||||
assert.Greater(t, dbSec.Key("query_retries").MustInt(), 0)
|
||||
|
||||
go func() {
|
||||
// When the server runs, it will also build and initialize the service graph
|
||||
if err := env.Server.Run(); err != nil {
|
||||
|
Reference in New Issue
Block a user