mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Uptime] Update targeted index pattern 7.x (#30964)
* Update targeted index pattern and rename API test indices. * Fix busted unit tests.
This commit is contained in:
parent
8584e8acea
commit
6551feacde
7 changed files with 7 additions and 169 deletions
|
@ -5,5 +5,5 @@
|
|||
*/
|
||||
|
||||
export const INDEX_NAMES = {
|
||||
HEARTBEAT: 'heartbeat*',
|
||||
HEARTBEAT: 'heartbeat-8*',
|
||||
};
|
||||
|
|
|
@ -68,7 +68,7 @@ describe('ElasticsearchPingsAdapter class', () => {
|
|||
beforeEach(() => {
|
||||
getAllSearchMock = jest.fn(async (request: any, params: any) => mockEsSearchResult);
|
||||
expectedGetAllParams = {
|
||||
index: 'heartbeat*',
|
||||
index: 'heartbeat-8*',
|
||||
body: {
|
||||
query: {
|
||||
bool: {
|
||||
|
@ -151,7 +151,7 @@ describe('ElasticsearchPingsAdapter class', () => {
|
|||
beforeEach(() => {
|
||||
getLatestSearchMock = jest.fn(async (request: any, params: any) => mockEsSearchResult);
|
||||
expectedGetLatestSearchParams = {
|
||||
index: 'heartbeat*',
|
||||
index: 'heartbeat-8*',
|
||||
body: {
|
||||
query: {
|
||||
bool: {
|
||||
|
|
|
@ -16,8 +16,8 @@ export default function ({ getService }) {
|
|||
describe('get_all_pings', () => {
|
||||
const archive = 'uptime/pings';
|
||||
|
||||
beforeEach('put pings in index', () => esArchiver.load(archive));
|
||||
afterEach('delete pings from index', () => esArchiver.unload(archive));
|
||||
before(() => esArchiver.load(archive));
|
||||
after(() => esArchiver.unload(archive));
|
||||
|
||||
it('should get all pings stored in index', async () => {
|
||||
const { body: apiResponse } = await supertest
|
||||
|
|
Binary file not shown.
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"type": "index",
|
||||
"value": {
|
||||
"index": "heartbeat-7.0.0",
|
||||
"index": "heartbeat-8.0.0",
|
||||
"mappings": {
|
||||
"_doc": {
|
||||
"_meta": {
|
||||
"version": "7.0.0"
|
||||
"version": "8.0.0"
|
||||
},
|
||||
"date_detection": false,
|
||||
"dynamic_templates": [
|
||||
|
|
|
@ -1,162 +0,0 @@
|
|||
{
|
||||
"type": "doc",
|
||||
"value": {
|
||||
"index": "heartbeat",
|
||||
"source": {
|
||||
"@timestamp": "2018-10-30T18:51:56.792Z",
|
||||
"beat": {
|
||||
"hostname": "foo.home",
|
||||
"name": "foo.home",
|
||||
"version": "6.5.0"
|
||||
},
|
||||
"host": {
|
||||
"architecture": "x86_64",
|
||||
"name": "foo.home",
|
||||
"os": {
|
||||
"build": "18A391",
|
||||
"family": "darwin",
|
||||
"platform": "darwin",
|
||||
"version": "10.14"
|
||||
}
|
||||
},
|
||||
"http": {
|
||||
"response": {
|
||||
"status_code": 200
|
||||
},
|
||||
"rtt": {
|
||||
"content": {
|
||||
"us": 10
|
||||
},
|
||||
"response_header": {
|
||||
"us": 71100
|
||||
},
|
||||
"total": {
|
||||
"us": 167348
|
||||
},
|
||||
"validate": {
|
||||
"us": 71111
|
||||
},
|
||||
"write_request": {
|
||||
"us": 59
|
||||
}
|
||||
},
|
||||
"url": "https://www.github.com/"
|
||||
},
|
||||
"monitor": {
|
||||
"duration": {
|
||||
"us": 197695
|
||||
},
|
||||
"host": "www.github.com",
|
||||
"id": "http@https://www.github.com/",
|
||||
"ip": "192.30.253.112",
|
||||
"name": "http",
|
||||
"scheme": "https",
|
||||
"status": "up",
|
||||
"type": "http"
|
||||
},
|
||||
"resolve": {
|
||||
"host": "www.github.com",
|
||||
"ip": "192.30.253.112",
|
||||
"rtt": {
|
||||
"us": 2615
|
||||
}
|
||||
},
|
||||
"tcp": {
|
||||
"port": 443,
|
||||
"rtt": {
|
||||
"connect": {
|
||||
"us": 9431
|
||||
}
|
||||
}
|
||||
},
|
||||
"tls": {
|
||||
"certificate_not_valid_after": "2020-06-03T12:00:00.000Z",
|
||||
"certificate_not_valid_before": "2018-05-08T00:00:00.000Z",
|
||||
"rtt": {
|
||||
"handshake": {
|
||||
"us": 29547
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"type": "doc",
|
||||
"value": {
|
||||
"index": "heartbeat",
|
||||
"source": {
|
||||
"@timestamp": "2018-10-30T14:49:23.889Z",
|
||||
"beat": {
|
||||
"hostname": "foo.heartbeat.com",
|
||||
"name": "foo_heartbeat",
|
||||
"version": "6.5.0"
|
||||
},
|
||||
"error": {
|
||||
"message": "received status code 404 expecting 200",
|
||||
"type": "validate"
|
||||
},
|
||||
"host": {
|
||||
"architecture": "x86_64",
|
||||
"name": "foo",
|
||||
"os": {
|
||||
"build": "18A391",
|
||||
"family": "darwin",
|
||||
"platform": "darwin",
|
||||
"version": "10.14"
|
||||
}
|
||||
},
|
||||
"http": {
|
||||
"response": {
|
||||
"status_code": 404
|
||||
},
|
||||
"rtt": {
|
||||
"content": {
|
||||
"us": 14
|
||||
},
|
||||
"response_header": {
|
||||
"us": 12467
|
||||
},
|
||||
"total": {
|
||||
"us": 13028
|
||||
},
|
||||
"validate": {
|
||||
"us": 12482
|
||||
},
|
||||
"write_request": {
|
||||
"us": 470
|
||||
}
|
||||
},
|
||||
"url": "http://localhost:12349/service/status"
|
||||
},
|
||||
"monitor": {
|
||||
"duration": {
|
||||
"us": 14846
|
||||
},
|
||||
"host": "localhost",
|
||||
"id": "http@http://localhost:12349/service/status",
|
||||
"ip": "127.0.0.1",
|
||||
"name": "http",
|
||||
"scheme": "http",
|
||||
"status": "down",
|
||||
"type": "http"
|
||||
},
|
||||
"resolve": {
|
||||
"host": "localhost",
|
||||
"ip": "127.0.0.1",
|
||||
"rtt": {
|
||||
"us": 1592
|
||||
}
|
||||
},
|
||||
"tcp": {
|
||||
"port": 12349,
|
||||
"rtt": {
|
||||
"connect": {
|
||||
"us": 475
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
x-pack/test/functional/es_archives/uptime/pings/data.json.gz
Normal file
BIN
x-pack/test/functional/es_archives/uptime/pings/data.json.gz
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue