Skip to content

Commit

Permalink
fixing rollup index test
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic committed Oct 7, 2021
1 parent 781a2aa commit fff2f43
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
[
{
"id": "d6ac99b0-2777-11ec-8e1c-aba6d0767aaa",
"title": "cloud_roll_index",
"fieldFormatMap": {},
"typeMeta": {
"params": {
"rollup_index": "cloud_roll_index"
},
"aggs": {
"date_histogram": {
"@timestamp": {
"agg": "date_histogram",
"fixed_interval": "5m",
"time_zone": "UTC"
}
}
}
},
"fields": [
{
"count": 0,
"name": "_source",
"type": "_source",
"esTypes": [
"_source"
],
"scripted": false,
"searchable": false,
"aggregatable": false,
"readFromDocValues": false
},
{
"count": 0,
"name": "_id",
"type": "string",
"esTypes": [
"_id"
],
"scripted": false,
"searchable": true,
"aggregatable": false,
"readFromDocValues": false
},
{
"count": 0,
"name": "_type",
"type": "string",
"scripted": false,
"searchable": false,
"aggregatable": false,
"readFromDocValues": false
},
{
"count": 0,
"name": "_index",
"type": "string",
"esTypes": [
"_index"
],
"scripted": false,
"searchable": true,
"aggregatable": true,
"readFromDocValues": false
},
{
"count": 0,
"name": "_score",
"type": "number",
"scripted": false,
"searchable": false,
"aggregatable": false,
"readFromDocValues": false
},
{
"count": 0,
"name": "@timestamp",
"type": "date",
"esTypes": [
"date"
],
"scripted": false,
"searchable": true,
"aggregatable": true,
"readFromDocValues": true
}
],
"timeFieldName": "@timestamp",
"type": "rollup",
"metaFields": [
"_source",
"_id",
"_type",
"_index",
"_score"
],
"version": "WzY5NjEsNF0=",
"originalSavedObjectBody": {
"fieldAttrs": "{}",
"title": "cloud_roll_index",
"timeFieldName": "@timestamp",
"fields": "[]",
"type": "rollup",
"typeMeta": "{\"params\":{\"rollup_index\":\"cloud_roll_index\"},\"aggs\":{\"date_histogram\":{\"@timestamp\":{\"agg\":\"date_histogram\",\"fixed_interval\":\"5m\",\"time_zone\":\"UTC\"}}}}",
"runtimeFieldMap": "{}"
},
"shortDotsEnable": false,
"fieldFormats": {
"fieldFormats": {},
"defaultMap": {
"ip": {
"id": "ip",
"params": {}
},
"date": {
"id": "date",
"params": {}
},
"date_nanos": {
"id": "date_nanos",
"params": {},
"es": true
},
"number": {
"id": "number",
"params": {}
},
"boolean": {
"id": "boolean",
"params": {}
},
"histogram": {
"id": "histogram",
"params": {}
},
"_source": {
"id": "_source",
"params": {}
},
"_default_": {
"id": "string",
"params": {}
}
},
"metaParamsOptions": {}
},
"fieldAttrs": {},
"runtimeFieldMap": {},
"allowNoIndex": false
}
]

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { newJobCapsProvider } from './index';
import farequoteFieldCaps from './__mocks__/responses/farequote_field_caps.json';
import cloudwatchFieldCaps from './__mocks__/responses/cloudwatch_field_caps.json';
import rollupCaps from './__mocks__/responses/rollup_caps.json';
import kibanaSavedObjects from './__mocks__/responses/kibana_saved_objects.json';
import dataView from './__mocks__/responses/data_view_rollup_cloudwatch.json';

import farequoteJobCaps from './__mocks__/results/farequote_job_caps.json';
import farequoteJobCapsEmpty from './__mocks__/results/farequote_job_caps_empty.json';
Expand Down Expand Up @@ -43,7 +43,7 @@ describe('job_service - job_caps', () => {

dataViews = {
async find() {
return Promise.resolve([kibanaSavedObjects]);
return Promise.resolve(dataView);
},
};
});
Expand Down

0 comments on commit fff2f43

Please sign in to comment.