Skip to content

Commit

Permalink
[Uptime] Update targeted index pattern 7.x (#30964)
Browse files Browse the repository at this point in the history
* Update targeted index pattern and rename API test indices.

* Fix busted unit tests.
  • Loading branch information
justinkambic authored Feb 14, 2019
1 parent 8584e8a commit 6551fea
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 169 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/uptime/common/constants/index_names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
*/

export const INDEX_NAMES = {
HEARTBEAT: 'heartbeat*',
HEARTBEAT: 'heartbeat-8*',
};
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/api_integration/apis/uptime/get_all_pings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
162 changes: 0 additions & 162 deletions x-pack/test/functional/es_archives/uptime/pings/data.json

This file was deleted.

Binary file not shown.

0 comments on commit 6551fea

Please sign in to comment.