mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 17:02:27 +08:00
Testdata: Rename package to circumvent convention in go (#19409)
Before this change the tests for test datasource was not run.
This commit is contained in:

committed by
GitHub

parent
d6eb4e8459
commit
00e7c7c4b7
@ -9,7 +9,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/tsdb"
|
||||
"github.com/grafana/grafana/pkg/tsdb/testdata"
|
||||
"github.com/grafana/grafana/pkg/tsdb/testdatasource"
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
)
|
||||
|
||||
@ -68,13 +68,13 @@ func GetTestDataScenarios(c *m.ReqContext) Response {
|
||||
result := make([]interface{}, 0)
|
||||
|
||||
scenarioIds := make([]string, 0)
|
||||
for id := range testdata.ScenarioRegistry {
|
||||
for id := range testdatasource.ScenarioRegistry {
|
||||
scenarioIds = append(scenarioIds, id)
|
||||
}
|
||||
sort.Strings(scenarioIds)
|
||||
|
||||
for _, scenarioId := range scenarioIds {
|
||||
scenario := testdata.ScenarioRegistry[scenarioId]
|
||||
scenario := testdatasource.ScenarioRegistry[scenarioId]
|
||||
result = append(result, map[string]interface{}{
|
||||
"id": scenario.Id,
|
||||
"name": scenario.Name,
|
||||
|
Reference in New Issue
Block a user