Elasticsearch: Fix where name of frame is set (#64233)
* Elasticsearch: Use displayName field for naming * Change solution to frame.Name to be backward compatible * Fix snapshot tests * Use Time and Value for time and value fields * Use variables from grafana-plugin-sdk-go for name
This commit is contained in:
@@ -61,18 +61,7 @@ func requireFloatAt(t *testing.T, expected float64, field *data.Field, index int
|
||||
}
|
||||
|
||||
func requireTimeSeriesName(t *testing.T, expected string, frame *data.Frame) {
|
||||
getField := func() *data.Field {
|
||||
for _, field := range frame.Fields {
|
||||
if field.Type() != data.FieldTypeTime {
|
||||
return field
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
field := getField()
|
||||
require.NotNil(t, expected, field.Config)
|
||||
require.Equal(t, expected, field.Config.DisplayNameFromDS)
|
||||
require.Equal(t, expected, frame.Name)
|
||||
}
|
||||
|
||||
func TestRefIdMatching(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user