Skip to content

Commit

Permalink
[data views] Reenable MKI test - change data import tool to be server…
Browse files Browse the repository at this point in the history
…less compatible (#181349)

## Summary

Change data import / export method so test works in MKI environment.

Closes #171479 and
#180568

Verified by running functional test runner run locally against MKI
environment.
  • Loading branch information
mattkime authored May 9, 2024
1 parent 02a22fd commit 1bcec40
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export const IndexPatternTable = ({
fill={true}
iconType="plusInCircle"
onClick={() => setShowCreateDialog(true)}
data-test-subj="createIndexPatternButton"
data-test-subj="createDataViewButton"
>
<FormattedMessage
id="indexPatternManagement.dataViewTable.createBtn"
Expand Down
13 changes: 1 addition & 12 deletions test/functional/page_objects/settings_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,18 +621,7 @@ export class SettingsPageObject extends FtrService {

async clickAddNewIndexPatternButton() {
await this.common.scrollKibanaBodyTop();

// if showing no data view prompt
const noDataView = await this.testSubjects.exists('createDataViewButton');
if (noDataView) {
await this.testSubjects.click('createDataViewButton');
return;
}

const tableView = await this.testSubjects.exists('createIndexPatternButton');
if (tableView) {
await this.testSubjects.click('createIndexPatternButton');
}
await this.testSubjects.click('createDataViewButton');
}

async selectRollupIndexPatternType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default function ({ getService }: FtrProviderContext) {
const svlCommonApi = getService('svlCommonApi');

describe('conflicts', function () {
this.tags('failsOnMKI');
before(() =>
esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/conflicts')
);
Expand All @@ -31,7 +30,7 @@ export default function ({ getService }: FtrProviderContext) {
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
// TODO: API requests in Serverless require internal request headers
.set(svlCommonApi.getInternalRequestHeader())
.query({ pattern: 'logs-*' })
.query({ pattern: 'logs-2017.01.*' })
.expect(200)
.then((resp) => {
expect(resp.body).to.eql({
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['settings', 'common', 'header']);

describe('creating and deleting default data view', function describeIndexTests() {
// failsOnMKI, see https://github.com/elastic/kibana/issues/171479
this.tags(['failsOnMKI']);
before(async function () {
// TODO: emptyKibanaIndex fails in Serverless with
// "index_not_found_exception: no such index [.kibana_ingest]",
Expand All @@ -31,7 +29,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await esArchiver.loadIfNeeded(
'x-pack/test_serverless/functional/es_archives/kibana_sample_data_flights_index_pattern'
);
await kibanaServer.importExport.load(
'test/functional/fixtures/kbn_archiver/kibana_sample_data_flights_index_pattern'
);
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional');

await kibanaServer.uiSettings.replace({});
// TODO: Navigation to Data View Management is different in Serverless
await PageObjects.common.navigateToApp('management');
Expand All @@ -41,10 +43,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
after(async function () {
// TODO: Loading this from `es_archives` in `test_serverless`
// instead since minor modifications were required

await esArchiver.unload(
'x-pack/test_serverless/functional/es_archives/kibana_sample_data_flights_index_pattern'
);

await kibanaServer.importExport.unload(
'test/functional/fixtures/kbn_archiver/kibana_sample_data_flights_index_pattern'
);
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const testSubjects = getService('testSubjects');

describe('edit field', function () {
// failsOnMKI, see https://github.com/elastic/kibana/issues/180568
this.tags(['failsOnMKI']);
before(async function () {
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const es = getService('es');

describe('index pattern filter', function describeIndexTests() {
// https://github.com/elastic/kibana/issues/178733
this.tags('failsOnMKI');
before(async function () {
await kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.uiSettings.replace({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const testSubjects = getService('testSubjects');

describe('runtime fields', function () {
// Bug: https://github.com/elastic/kibana/issues/178939
this.tags('failsOnMKI');
before(async function () {
await browser.setWindowSize(1200, 800);
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
const svlCommonPage = getPageObject('svlCommonPage');

describe('default dataView', function () {
// Error: expected testSubject(kbnOverviewElasticsearchGettingStarted) to exist
this.tags(['failsOnMKI']);
before(async () => {
await svlCommonPage.login();
await svlSearchNavigation.navigateToLandingPage();
Expand Down

0 comments on commit 1bcec40

Please sign in to comment.