mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 19:22:34 +08:00
Config: Add configuration option to define custom user-facing general error message for certain error types (#70023)
--------- Co-authored-by: Summer Wollin <summer.wollin@grafana.com> Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
This commit is contained in:
@ -8,13 +8,15 @@ import (
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestMacroEngine(t *testing.T) {
|
||||
engine := &mySQLMacroEngine{
|
||||
logger: log.New("test"),
|
||||
logger: log.New("test"),
|
||||
userError: "inspect Grafana server log for details",
|
||||
}
|
||||
query := &backend.DataQuery{}
|
||||
|
||||
@ -193,7 +195,7 @@ func TestMacroEngine(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMacroEngineConcurrency(t *testing.T) {
|
||||
engine := newMysqlMacroEngine(log.New("test"))
|
||||
engine := newMysqlMacroEngine(log.New("test"), setting.NewCfg())
|
||||
query1 := backend.DataQuery{
|
||||
JSON: []byte{},
|
||||
}
|
||||
|
Reference in New Issue
Block a user