mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
update estimateBucketSpan schema and api test (#58004)
This commit is contained in:
parent
39c835af60
commit
47bb7c61b6
2 changed files with 18 additions and 0 deletions
|
@ -11,6 +11,7 @@ export const estimateBucketSpanSchema = schema.object({
|
|||
aggTypes: schema.arrayOf(schema.nullable(schema.string())),
|
||||
duration: schema.object({ start: schema.number(), end: schema.number() }),
|
||||
fields: schema.arrayOf(schema.nullable(schema.string())),
|
||||
filters: schema.maybe(schema.arrayOf(schema.any())),
|
||||
index: schema.string(),
|
||||
query: schema.any(),
|
||||
splitField: schema.maybe(schema.string()),
|
||||
|
|
|
@ -69,6 +69,23 @@ export default ({ getService }: FtrProviderContext) => {
|
|||
responseBody: { name: '3h', ms: 10800000 },
|
||||
},
|
||||
},
|
||||
{
|
||||
testTitleSuffix: 'with 1 field, 1 agg, no split, and empty filters',
|
||||
user: USER.ML_POWERUSER,
|
||||
requestBody: {
|
||||
aggTypes: ['avg'],
|
||||
duration: { start: 1560297859000, end: 1562975136000 },
|
||||
fields: ['taxless_total_price'],
|
||||
filters: [],
|
||||
index: 'ecommerce',
|
||||
query: { bool: { must: [{ match_all: {} }] } },
|
||||
timeField: 'order_date',
|
||||
},
|
||||
expected: {
|
||||
responseCode: 200,
|
||||
responseBody: { name: '15m', ms: 900000 },
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
describe('bucket span estimator', function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue