mirror of
https://github.com/elastic/kibana.git
synced 2025-06-29 03:24:45 -04:00
Renames references to index pattern to data views. - Updates references in `data-test-subj` attributes for data frame analytics. - Renames methods in the ` ml.testResources` service used in tests. - `IndexPattern` references in testing code referring to single indices were renamed to use `IndexName`. For variable names still using `IndexPattern` they were prefixed with e.g. `esIndexPattern` to avoid ambiguity with the legacy data view name. Note there are still references in the state management code of the data frame analytics creation wizard, this wasn't picked up in this PR since it focuses mostly on test related code.
47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
* 2.0.
|
|
*/
|
|
|
|
import expect from '@kbn/expect';
|
|
|
|
import { FtrProviderContext } from '../../ftr_provider_context';
|
|
|
|
export default function ({ getService }: FtrProviderContext) {
|
|
const log = getService('log');
|
|
const supertest = getService('supertest');
|
|
const transform = getService('transform');
|
|
|
|
describe('watcher', () => {
|
|
before(async () => {
|
|
try {
|
|
await transform.testResources.createDataViewIfNeeded('ft_ecommerce', 'order_date');
|
|
} catch (error) {
|
|
log.debug('[Setup error] Error creating index pattern');
|
|
throw error;
|
|
}
|
|
});
|
|
|
|
after(async () => {
|
|
try {
|
|
await transform.testResources.deleteDataViewByTitle('ft_ecommerce');
|
|
} catch (error) {
|
|
log.debug('[Cleanup error] Error deleting index pattern');
|
|
throw error;
|
|
}
|
|
});
|
|
|
|
describe('POST /api/watcher/indices/index_patterns', () => {
|
|
it('returns list of index patterns', async () => {
|
|
const response = await supertest
|
|
.get('/api/watcher/indices/index_patterns')
|
|
.set('kbn-xsrf', 'kibana')
|
|
.expect(200);
|
|
|
|
expect(response.body).to.contain('ft_ecommerce');
|
|
});
|
|
});
|
|
});
|
|
}
|