@ -39,7 +39,6 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
require . Equal ( t , dateHistogramAgg . ExtendedBounds . Min , fromMs )
require . Equal ( t , dateHistogramAgg . ExtendedBounds . Min , fromMs )
require . Equal ( t , dateHistogramAgg . ExtendedBounds . Max , toMs )
require . Equal ( t , dateHistogramAgg . ExtendedBounds . Max , toMs )
} )
} )
t . Run ( "Should clean settings from null values (from frontend tests)" , func ( t * testing . T ) {
t . Run ( "Should clean settings from null values (from frontend tests)" , func ( t * testing . T ) {
c := newFakeClient ( )
c := newFakeClient ( )
_ , err := executeTsdbQuery ( c , ` {
_ , err := executeTsdbQuery ( c , ` {
@ -52,8 +51,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
firstLevel := sr . Aggs [ 0 ]
firstLevel := sr . Aggs [ 0 ]
secondLevel := firstLevel . Aggregation . Aggs [ 0 ]
secondLevel := firstLevel . Aggregation . Aggs [ 0 ]
require . Equal ( t , secondLevel . Aggregation . Aggregation . ( * es . MetricAggregation ) . Settings [ "script" ] , "1" )
require . Equal ( t , secondLevel . Aggregation . Aggregation . ( * es . MetricAggregation ) . Settings [ "script" ] , "1" )
// FIXME: This is a bug in implementation, missing is set to "null" instead of being removed
require . NotContains ( t , secondLevel . Aggregation . Aggregation . ( * es . MetricAggregation ) . Settings , "missing" )
// require.Equal(t, secondLevel.Aggregation.Aggregation.(*es.MetricAggregation).Settings["missing"], nil)
} )
} )
t . Run ( "With multiple bucket aggs" , func ( t * testing . T ) {
t . Run ( "With multiple bucket aggs" , func ( t * testing . T ) {