Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Disables ingest manager integration tests #59464

Merged
merged 3 commits into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/plugins/es_ui_shared/public/request/request.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import sinon from 'sinon';
import { sendRequest as sendRequestUnbound, useRequest as useRequestUnbound } from './request';
// import { sendRequest as sendRequestUnbound, useRequest as useRequestUnbound } from './request';

import React from 'react';
import { act } from 'react-dom/test-utils';
Expand Down Expand Up @@ -52,6 +52,11 @@ describe.skip('request lib', () => {
let sendRequest;
let useRequest;

/**
*
* commented out due to hooks being called regardless of skip
* https://github.com/facebook/jest/issues/8379

beforeEach(() => {
sendPost = sinon.stub();
sendPost.withArgs(successRequest.path, successRequest.body).returns(successResponse);
Expand All @@ -67,6 +72,8 @@ describe.skip('request lib', () => {
useRequest = useRequestUnbound.bind(null, httpClient);
});

*/

describe('sendRequest function', () => {
it('uses the provided path, method, and body to send the request', async () => {
const response = await sendRequest({ ...successRequest });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
* you may not use this file except in compliance with the Elastic License.
*/

test.skip('requires one test', () => {});

/**
* skipped due to all being flaky: https://github.com/elastic/kibana/issues/58954
*
* commented out due to hooks being called regardless of skip
* https://github.com/facebook/jest/issues/8379

import { resolve } from 'path';
import * as kbnTestServer from '../../../../../src/test_utils/kbn_server';

Expand All @@ -25,6 +33,7 @@ function createXPackRoot(config: {} = {}) {
describe('ingestManager', () => {
describe('default. manager, EPM, and Fleet all disabled', () => {
let root: ReturnType<typeof kbnTestServer.createRoot>;

beforeAll(async () => {
root = createXPackRoot();
await root.setup();
Expand Down Expand Up @@ -52,6 +61,7 @@ describe('ingestManager', () => {

describe('manager only (no EPM, no Fleet)', () => {
let root: ReturnType<typeof kbnTestServer.createRoot>;

beforeAll(async () => {
const ingestManagerConfig = {
enabled: true,
Expand Down Expand Up @@ -89,6 +99,7 @@ describe('ingestManager', () => {

describe('manager and EPM; no Fleet', () => {
let root: ReturnType<typeof kbnTestServer.createRoot>;

beforeAll(async () => {
const ingestManagerConfig = {
enabled: true,
Expand Down Expand Up @@ -122,6 +133,7 @@ describe('ingestManager', () => {

describe('manager and Fleet; no EPM)', () => {
let root: ReturnType<typeof kbnTestServer.createRoot>;

beforeAll(async () => {
const ingestManagerConfig = {
enabled: true,
Expand Down Expand Up @@ -156,6 +168,7 @@ describe('ingestManager', () => {

describe('all flags enabled: manager, EPM, and Fleet)', () => {
let root: ReturnType<typeof kbnTestServer.createRoot>;

beforeAll(async () => {
const ingestManagerConfig = {
enabled: true,
Expand Down Expand Up @@ -188,3 +201,4 @@ describe('ingestManager', () => {
});
});
});
*/
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,28 @@

jest.mock('ui/new_platform');
import { RemoteClusterForm } from '../../public/application/sections/components/remote_cluster_form';
import { pageHelpers, setupEnvironment, nextTick } from './helpers';
// import { pageHelpers, setupEnvironment, nextTick } from './helpers';
import { pageHelpers, nextTick } from './helpers';
import { REMOTE_CLUSTER_EDIT, REMOTE_CLUSTER_EDIT_NAME } from './helpers/constants';

const { setup } = pageHelpers.remoteClustersEdit;
// const { setup } = pageHelpers.remoteClustersEdit;
const { setup: setupRemoteClustersAdd } = pageHelpers.remoteClustersAdd;

// FLAKY: https://github.com/elastic/kibana/issues/57762
// FLAKY: https://github.com/elastic/kibana/issues/57997
// FLAKY: https://github.com/elastic/kibana/issues/57998
describe.skip('Edit Remote cluster', () => {
let server;
let httpRequestsMockHelpers;
// let server;
// let httpRequestsMockHelpers;
let component;
let find;
let exists;

/**
*
* commented out due to hooks being called regardless of skip
* https://github.com/facebook/jest/issues/8379

beforeAll(() => {
({ server, httpRequestsMockHelpers } = setupEnvironment());
});
Expand All @@ -38,6 +44,8 @@ describe.skip('Edit Remote cluster', () => {
component.update();
});

*/

test('should have the title of the page set correctly', () => {
expect(exists('remoteClusterPageTitle')).toBe(true);
expect(find('remoteClusterPageTitle').text()).toEqual('Edit remote cluster');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,19 @@ describe.skip('onPostAuthInterceptor', () => {
).toString('base64')}`,
};

/**
*
* commented out due to hooks being called regardless of skip
* https://github.com/facebook/jest/issues/8379

beforeEach(async () => {
root = kbnTestServer.createRoot();
});

afterEach(async () => await root.shutdown());

*/

function initKbnServer(router: IRouter, basePath: IBasePath, routes: 'legacy' | 'new-platform') {
const kbnServer = kbnTestServer.getKbnServer(root);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,19 @@ import { elasticsearchServiceMock } from 'src/core/server/mocks';
describe.skip('onRequestInterceptor', () => {
let root: ReturnType<typeof kbnTestServer.createRoot>;

/**
*
* commented out due to hooks being called regardless of skip
* https://github.com/facebook/jest/issues/8379

beforeEach(async () => {
root = kbnTestServer.createRoot();
}, 30000);

afterEach(async () => await root.shutdown());

*/

function initKbnServer(router: IRouter, basePath: IBasePath, routes: 'legacy' | 'new-platform') {
const kbnServer = kbnTestServer.getKbnServer(root);

Expand Down
21 changes: 15 additions & 6 deletions x-pack/test_utils/jest/contract_tests/example.contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,25 @@

import Slapshot from '@mattapperson/slapshot';

import { createKibanaServer } from './servers';
import { getEsArchiver } from './services/es_archiver';
import { EsArchiver } from 'src/es_archiver';
import * as path from 'path';
// import { createKibanaServer } from './servers';
// import { getEsArchiver } from './services/es_archiver';
// import { EsArchiver } from 'src/es_archiver';
// import * as path from 'path';
import * as legacyElasticsearch from 'elasticsearch';

const { callWhenOnline, memorize } = Slapshot;
// const { callWhenOnline, memorize } = Slapshot;
const { memorize } = Slapshot;

let servers: { kbnServer: any; shutdown: () => void };
let esArchiver: EsArchiver;
// let esArchiver: EsArchiver;

// FLAKY: https://github.com/elastic/kibana/issues/44250
describe.skip('Example contract tests', () => {
/**
*
* commented out due to hooks being called regardless of skip
* https://github.com/facebook/jest/issues/8379

beforeAll(async () => {
await callWhenOnline(async () => {
servers = await createKibanaServer();
Expand All @@ -28,6 +34,7 @@ describe.skip('Example contract tests', () => {
});
});
});

afterAll(async () => {
if (servers) {
await servers.shutdown();
Expand All @@ -37,6 +44,8 @@ describe.skip('Example contract tests', () => {
beforeEach(async () => await callWhenOnline(() => esArchiver.load('example')));
afterEach(async () => await callWhenOnline(() => esArchiver.unload('example')));

*/

it('should run online or offline', async () => {
const res = await memorize('example_test_snapshot', async () => {
return { serverExists: !!servers.kbnServer };
Expand Down