Skip to content

Commit

Permalink
Fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YulNaumenko committed Mar 5, 2020
1 parent b749d81 commit a303775
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 40 deletions.
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/siem/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const siem = (kibana: any) => {
id: APP_ID,
configPrefix: 'xpack.siem',
publicDir: resolve(__dirname, 'public'),
require: ['kibana', 'elasticsearch', 'alerting', 'actions', 'triggers_actions_ui'],
require: ['kibana', 'elasticsearch', 'alerting', 'actions'],
uiExports: {
app: {
description: i18n.translate('xpack.siem.securityDescription', {
Expand Down
27 changes: 2 additions & 25 deletions x-pack/legacy/plugins/siem/public/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,10 @@

import { npSetup, npStart } from 'ui/new_platform';

import {
TriggersAndActionsUIPublicPluginSetup,
TriggersAndActionsUIPublicPluginStart,
} from '../../../../plugins/triggers_actions_ui/public';
import { PluginInitializerContext } from '../../../../../src/core/public';
import { plugin } from './';

const pluginInstance = plugin({} as PluginInitializerContext);

type PluginsSetupExtended = typeof npSetup.plugins & {
// adds plugins which aren't in the PluginsSetup interface, but do exist
triggers_actions_ui: TriggersAndActionsUIPublicPluginSetup;
};

type PluginsStartExtended = typeof npStart.plugins & {
// adds plugins which aren't in the PluginsSetup interface, but do exist
triggers_actions_ui: TriggersAndActionsUIPublicPluginStart;
};

const setupDependencies = npSetup.plugins as PluginsSetupExtended;
const startDependencies = npStart.plugins as PluginsStartExtended;

pluginInstance.setup(npSetup.core, {
...npSetup.plugins,
triggers_actions_ui: setupDependencies.triggers_actions_ui,
});
pluginInstance.start(npStart.core, {
...npStart.plugins,
triggers_actions_ui: startDependencies.triggers_actions_ui,
});
pluginInstance.setup(npSetup.core, npSetup.plugins);
pluginInstance.start(npStart.core, npStart.plugins);
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

import React from 'react';

import * as i18nCommon from '../../common/translations';
import { EmptyPage } from '../../../components/empty_page';
import { useKibana } from '../../../lib/kibana';
Expand Down
6 changes: 0 additions & 6 deletions x-pack/legacy/plugins/siem/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import { Start as NewsfeedStart } from '../../../../../src/plugins/newsfeed/publ
import { Start as InspectorStart } from '../../../../../src/plugins/inspector/public';
import { UiActionsStart } from '../../../../../src/plugins/ui_actions/public';
import { UsageCollectionSetup } from '../../../../../src/plugins/usage_collection/public';
import {
TriggersAndActionsUIPublicPluginSetup,
TriggersAndActionsUIPublicPluginStart,
} from '../../../../plugins/triggers_actions_ui/public';
import { initTelemetry } from './lib/telemetry';
import { KibanaServices } from './lib/kibana';

Expand All @@ -30,15 +26,13 @@ export { AppMountParameters, CoreSetup, CoreStart, PluginInitializerContext };
export interface SetupPlugins {
home: HomePublicPluginSetup;
usageCollection: UsageCollectionSetup;
triggers_actions_ui: TriggersAndActionsUIPublicPluginSetup;
}
export interface StartPlugins {
data: DataPublicPluginStart;
embeddable: IEmbeddableStart;
inspector: InspectorStart;
newsfeed?: NewsfeedStart;
uiActions: UiActionsStart;
triggers_actions_ui: TriggersAndActionsUIPublicPluginStart;
}
export type StartServices = CoreStart & StartPlugins;

Expand Down
2 changes: 0 additions & 2 deletions x-pack/test/detection_engine_api_integration/common/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions)
`--xpack.actions.enabledActionTypes=${JSON.stringify(enabledActionTypes)}`,
'--xpack.alerting.enabled=true',
'--xpack.eventLog.logEntries=true',
'--xpack.triggers_actions_ui.enabled=true',
'--xpack.triggers_actions_ui.createAlertUiEnabled=true',
...disabledPlugins.map(key => `--xpack.${key}.enabled=false`),
`--plugin-path=${path.join(__dirname, 'fixtures', 'plugins', 'alerts')}`,
`--plugin-path=${path.join(__dirname, 'fixtures', 'plugins', 'actions')}`,
Expand Down
2 changes: 0 additions & 2 deletions x-pack/test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ export default async function({ readConfigFile }) {
'--telemetry.banner=false',
'--timelion.ui.enabled=true',
'--xpack.endpoint.enabled=true',
'--xpack.triggers_actions_ui.enabled=true',
'--xpack.triggers_actions_ui.createAlertUiEnabled=true',
],
},
uiSettings: {
Expand Down
2 changes: 0 additions & 2 deletions x-pack/test/licensing_plugin/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ export default async function({ readConfigFile }: FtrConfigProviderContext) {
serverArgs: [
...functionalTestsConfig.get('kbnTestServer.serverArgs'),
'--xpack.licensing.api_polling_frequency=100',
'--xpack.triggers_actions_ui.enabled=true',
'--xpack.triggers_actions_ui.createAlertUiEnabled=true',
],
},

Expand Down
2 changes: 0 additions & 2 deletions x-pack/test/plugin_api_integration/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ export default async function({ readConfigFile }) {
...integrationConfig.get('kbnTestServer'),
serverArgs: [
...integrationConfig.get('kbnTestServer.serverArgs'),
'--xpack.triggers_actions_ui.enabled=true',
'--xpack.triggers_actions_ui.createAlertUiEnabled=true',
...plugins.map(
pluginDir => `--plugin-path=${path.resolve(__dirname, 'plugins', pluginDir)}`
),
Expand Down

0 comments on commit a303775

Please sign in to comment.