mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
move code shared with alerting api-integration plugins into a package (#148846)
We're working on converting all plugins into packages, which turns almost all code in the repository into a package except for things like the `test` and `x-pack/test` directories. The problem we ran into is that the alerting api-integration test plugins are being migrated to packages but they are currently consuming a handful of helpers from the parent `../lib` directory. This doesn't work, as packages can only import other packages and the `../lib` directory isn't in a package, it's just free-floating `x-pack/test` code. To fix this I've moved the necessary components out of `common/lib` and into `packages/helpers` which is importable via `@kbn/alerting-api-integration-helpers` and updated all the uses to access this new package.
This commit is contained in:
parent
4da8f56354
commit
1880e8b348
59 changed files with 139 additions and 147 deletions
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
|
@ -1086,3 +1086,4 @@ x-pack/packages/ml/nested_property @elastic/ml-ui
|
||||||
x-pack/packages/ml/query_utils @elastic/ml-ui
|
x-pack/packages/ml/query_utils @elastic/ml-ui
|
||||||
x-pack/packages/ml/string_hash @elastic/ml-ui
|
x-pack/packages/ml/string_hash @elastic/ml-ui
|
||||||
x-pack/packages/ml/url_state @elastic/ml-ui
|
x-pack/packages/ml/url_state @elastic/ml-ui
|
||||||
|
x-pack/test/alerting_api_integration/packages/helpers @elastic/response-ops
|
||||||
|
|
|
@ -748,6 +748,7 @@
|
||||||
"@jest/reporters": "^29.3.1",
|
"@jest/reporters": "^29.3.1",
|
||||||
"@jest/transform": "^29.3.1",
|
"@jest/transform": "^29.3.1",
|
||||||
"@jest/types": "^29.3.1",
|
"@jest/types": "^29.3.1",
|
||||||
|
"@kbn/alerting-api-integration-helpers": "link:x-pack/test/alerting_api_integration/packages/helpers",
|
||||||
"@kbn/ambient-common-types": "link:packages/kbn-ambient-common-types",
|
"@kbn/ambient-common-types": "link:packages/kbn-ambient-common-types",
|
||||||
"@kbn/ambient-ftr-types": "link:packages/kbn-ambient-ftr-types",
|
"@kbn/ambient-ftr-types": "link:packages/kbn-ambient-ftr-types",
|
||||||
"@kbn/ambient-storybook-types": "link:packages/kbn-ambient-storybook-types",
|
"@kbn/ambient-storybook-types": "link:packages/kbn-ambient-storybook-types",
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
"@kbn/aiops-plugin/*": ["x-pack/plugins/aiops/*"],
|
"@kbn/aiops-plugin/*": ["x-pack/plugins/aiops/*"],
|
||||||
"@kbn/aiops-utils": ["x-pack/packages/ml/aiops_utils"],
|
"@kbn/aiops-utils": ["x-pack/packages/ml/aiops_utils"],
|
||||||
"@kbn/aiops-utils/*": ["x-pack/packages/ml/aiops_utils/*"],
|
"@kbn/aiops-utils/*": ["x-pack/packages/ml/aiops_utils/*"],
|
||||||
|
"@kbn/alerting-api-integration-helpers": ["x-pack/test/alerting_api_integration/packages/helpers"],
|
||||||
|
"@kbn/alerting-api-integration-helpers/*": ["x-pack/test/alerting_api_integration/packages/helpers/*"],
|
||||||
"@kbn/alerting-example-plugin": ["x-pack/examples/alerting_example"],
|
"@kbn/alerting-example-plugin": ["x-pack/examples/alerting_example"],
|
||||||
"@kbn/alerting-example-plugin/*": ["x-pack/examples/alerting_example/*"],
|
"@kbn/alerting-example-plugin/*": ["x-pack/examples/alerting_example/*"],
|
||||||
"@kbn/alerting-fixture-plugin": ["x-pack/test/functional_with_es_ssl/plugins/alerts"],
|
"@kbn/alerting-fixture-plugin": ["x-pack/test/functional_with_es_ssl/plugins/alerts"],
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Space, User } from '../types';
|
import { Space, User } from '../types';
|
||||||
import { ObjectRemover } from './object_remover';
|
import { ObjectRemover } from './object_remover';
|
||||||
import { getUrlPrefix } from './space_test_utils';
|
import { getUrlPrefix } from './space_test_utils';
|
||||||
import { ES_TEST_INDEX_NAME } from './es_test_index_tool';
|
|
||||||
import { getTestRuleData } from './get_test_rule_data';
|
import { getTestRuleData } from './get_test_rule_data';
|
||||||
|
|
||||||
export interface AlertUtilsOpts {
|
export interface AlertUtilsOpts {
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
export { ObjectRemover } from './object_remover';
|
export { ObjectRemover } from './object_remover';
|
||||||
export { getUrlPrefix } from './space_test_utils';
|
export { getUrlPrefix } from './space_test_utils';
|
||||||
export { ES_TEST_INDEX_NAME, ESTestIndexTool } from './es_test_index_tool';
|
|
||||||
export { getTestRuleData } from './get_test_rule_data';
|
export { getTestRuleData } from './get_test_rule_data';
|
||||||
export {
|
export {
|
||||||
AlertUtils,
|
AlertUtils,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import getPort from 'get-port';
|
import getPort from 'get-port';
|
||||||
import http from 'http';
|
import http from 'http';
|
||||||
import httpProxy from 'http-proxy';
|
import httpProxy from 'http-proxy';
|
||||||
import { getProxyPort } from '../../../lib/get_proxy_server';
|
import { getProxyPort } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { getDataFromRequest } from './data_handler';
|
import { getDataFromRequest } from './data_handler';
|
||||||
|
|
||||||
export interface ProxyArgs {
|
export interface ProxyArgs {
|
||||||
|
|
|
@ -18,8 +18,8 @@ import {
|
||||||
RuleTypeParams,
|
RuleTypeParams,
|
||||||
} from '@kbn/alerting-plugin/server';
|
} from '@kbn/alerting-plugin/server';
|
||||||
import { AlertConsumers } from '@kbn/rule-data-utils';
|
import { AlertConsumers } from '@kbn/rule-data-utils';
|
||||||
|
import { ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FixtureStartDeps, FixtureSetupDeps } from './plugin';
|
import { FixtureStartDeps, FixtureSetupDeps } from './plugin';
|
||||||
import { ES_TEST_INDEX_NAME } from '../../../lib';
|
|
||||||
|
|
||||||
export const EscapableStrings = {
|
export const EscapableStrings = {
|
||||||
escapableBold: '*bold*',
|
escapableBold: '*bold*',
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
# @kbn/alerting-api-integration-helpers
|
||||||
|
|
||||||
|
A package to hold alerting api-integration test helpers that are shared with the the alerting api-integration plugins.
|
|
@ -5,6 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import type { Client } from '@elastic/elasticsearch';
|
import type { Client } from '@elastic/elasticsearch';
|
||||||
|
|
||||||
export const ES_TEST_INDEX_NAME = '.kibana-alerting-test-data';
|
export const ES_TEST_INDEX_NAME = '.kibana-alerting-test-data';
|
||||||
|
|
||||||
export class ESTestIndexTool {
|
export class ESTestIndexTool {
|
|
@ -0,0 +1,9 @@
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export * from './es_test_index_tool';
|
||||||
|
export * from './get_proxy_server';
|
|
@ -0,0 +1,12 @@
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
preset: '@kbn/test/jest_node',
|
||||||
|
rootDir: '../../../../..',
|
||||||
|
roots: ['<rootDir>/x-pack/test/alerting_api_integration/packages/helpers'],
|
||||||
|
};
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"type": "test-helper",
|
||||||
|
"id": "@kbn/alerting-api-integration-helpers",
|
||||||
|
"owner": "@elastic/response-ops",
|
||||||
|
"devOnly": true
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"name": "@kbn/alerting-api-integration-helpers",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"license": "SSPL-1.0 OR Elastic License 2.0"
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../../../../tsconfig.base.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "target/types",
|
||||||
|
"types": [
|
||||||
|
"jest",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"**/*.ts",
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"target/**/*"
|
||||||
|
],
|
||||||
|
"kbn_references": []
|
||||||
|
}
|
|
@ -8,7 +8,7 @@
|
||||||
import httpProxy from 'http-proxy';
|
import httpProxy from 'http-proxy';
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import httpProxy from 'http-proxy';
|
import httpProxy from 'http-proxy';
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -10,8 +10,8 @@ import expect from '@kbn/expect';
|
||||||
import { promisify } from 'util';
|
import { promisify } from 'util';
|
||||||
import httpProxy from 'http-proxy';
|
import httpProxy from 'http-proxy';
|
||||||
import { KBN_KEY_PATH } from '@kbn/dev-utils';
|
import { KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||||
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
|
|
||||||
import {
|
import {
|
||||||
ExternalServiceSimulator,
|
ExternalServiceSimulator,
|
||||||
getExternalServiceSimulatorPath,
|
getExternalServiceSimulatorPath,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import httpProxy from 'http-proxy';
|
import httpProxy from 'http-proxy';
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import httpProxy from 'http-proxy';
|
import httpProxy from 'http-proxy';
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { asyncForEach } from '@kbn/std';
|
||||||
import getPort from 'get-port';
|
import getPort from 'get-port';
|
||||||
import http from 'http';
|
import http from 'http';
|
||||||
|
|
||||||
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import { getServiceNowServer } from '../../../../../common/plugins/actions_simulators/server/plugin';
|
import { getServiceNowServer } from '../../../../../common/plugins/actions_simulators/server/plugin';
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { asyncForEach } from '@kbn/std';
|
||||||
import getPort from 'get-port';
|
import getPort from 'get-port';
|
||||||
import http from 'http';
|
import http from 'http';
|
||||||
|
|
||||||
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import { getServiceNowServer } from '../../../../../common/plugins/actions_simulators/server/plugin';
|
import { getServiceNowServer } from '../../../../../common/plugins/actions_simulators/server/plugin';
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { asyncForEach } from '@kbn/std';
|
||||||
import getPort from 'get-port';
|
import getPort from 'get-port';
|
||||||
import http from 'http';
|
import http from 'http';
|
||||||
|
|
||||||
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import { getServiceNowServer } from '../../../../../common/plugins/actions_simulators/server/plugin';
|
import { getServiceNowServer } from '../../../../../common/plugins/actions_simulators/server/plugin';
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import httpProxy from 'http-proxy';
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
import http from 'http';
|
import http from 'http';
|
||||||
import getPort from 'get-port';
|
import getPort from 'get-port';
|
||||||
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
|
|
||||||
import { getSlackServer } from '../../../../../common/plugins/actions_simulators/server/plugin';
|
import { getSlackServer } from '../../../../../common/plugins/actions_simulators/server/plugin';
|
||||||
|
|
|
@ -10,7 +10,7 @@ import expect from '@kbn/expect';
|
||||||
import getPort from 'get-port';
|
import getPort from 'get-port';
|
||||||
import http from 'http';
|
import http from 'http';
|
||||||
|
|
||||||
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import { getSwimlaneServer } from '../../../../../common/plugins/actions_simulators/server/plugin';
|
import { getSwimlaneServer } from '../../../../../common/plugins/actions_simulators/server/plugin';
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import http from 'http';
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
import { URL, format as formatUrl } from 'url';
|
import { URL, format as formatUrl } from 'url';
|
||||||
import getPort from 'get-port';
|
import getPort from 'get-port';
|
||||||
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import {
|
import {
|
||||||
getExternalServiceSimulatorPath,
|
getExternalServiceSimulatorPath,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import httpProxy from 'http-proxy';
|
import httpProxy from 'http-proxy';
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -7,14 +7,9 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
import { IValidatedEvent, nanosToMillis } from '@kbn/event-log-plugin/server';
|
import { IValidatedEvent, nanosToMillis } from '@kbn/event-log-plugin/server';
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { UserAtSpaceScenarios } from '../../../scenarios';
|
import { UserAtSpaceScenarios } from '../../../scenarios';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover, getEventLog } from '../../../../common/lib';
|
||||||
ESTestIndexTool,
|
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
getEventLog,
|
|
||||||
} from '../../../../common/lib';
|
|
||||||
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
|
|
@ -11,11 +11,10 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||||
import { IValidatedEvent, nanosToMillis } from '@kbn/event-log-plugin/server';
|
import { IValidatedEvent, nanosToMillis } from '@kbn/event-log-plugin/server';
|
||||||
import { TaskRunning, TaskRunningStage } from '@kbn/task-manager-plugin/server/task_running';
|
import { TaskRunning, TaskRunningStage } from '@kbn/task-manager-plugin/server/task_running';
|
||||||
import { ConcreteTaskInstance } from '@kbn/task-manager-plugin/server';
|
import { ConcreteTaskInstance } from '@kbn/task-manager-plugin/server';
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { UserAtSpaceScenarios, Superuser } from '../../../scenarios';
|
import { UserAtSpaceScenarios, Superuser } from '../../../scenarios';
|
||||||
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
||||||
import {
|
import {
|
||||||
ESTestIndexTool,
|
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
getUrlPrefix,
|
getUrlPrefix,
|
||||||
getTestRuleData,
|
getTestRuleData,
|
||||||
ObjectRemover,
|
ObjectRemover,
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
import { ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { UserAtSpaceScenarios } from '../../../scenarios';
|
import { UserAtSpaceScenarios } from '../../../scenarios';
|
||||||
import {
|
import {
|
||||||
getTestRuleData,
|
getTestRuleData,
|
||||||
|
@ -13,7 +14,6 @@ import {
|
||||||
ObjectRemover,
|
ObjectRemover,
|
||||||
getEventLog,
|
getEventLog,
|
||||||
AlertUtils,
|
AlertUtils,
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
} from '../../../../common/lib';
|
} from '../../../../common/lib';
|
||||||
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
||||||
|
|
||||||
|
|
|
@ -7,14 +7,9 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
|
import { ESTestIndexTool } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Spaces } from '../../../scenarios';
|
import { Spaces } from '../../../scenarios';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover, getTestRuleData, getEventLog } from '../../../../common/lib';
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
getTestRuleData,
|
|
||||||
getEventLog,
|
|
||||||
ESTestIndexTool,
|
|
||||||
} from '../../../../common/lib';
|
|
||||||
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
|
|
@ -6,16 +6,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { UserAtSpaceScenarios } from '../../../scenarios';
|
import { UserAtSpaceScenarios } from '../../../scenarios';
|
||||||
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
||||||
import {
|
import { getUrlPrefix, getTestRuleData, ObjectRemover, AlertUtils } from '../../../../common/lib';
|
||||||
getUrlPrefix,
|
|
||||||
getTestRuleData,
|
|
||||||
ObjectRemover,
|
|
||||||
AlertUtils,
|
|
||||||
ESTestIndexTool,
|
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
} from '../../../../common/lib';
|
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default function createFindTests({ getService }: FtrProviderContext) {
|
export default function createFindTests({ getService }: FtrProviderContext) {
|
||||||
|
|
|
@ -18,11 +18,11 @@ import axios from 'axios';
|
||||||
import httpProxy from 'http-proxy';
|
import httpProxy from 'http-proxy';
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
import { getHttpProxyServer } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Spaces } from '../../../scenarios';
|
import { Spaces } from '../../../scenarios';
|
||||||
import { getUrlPrefix, getTestRuleData, ObjectRemover } from '../../../../common/lib';
|
import { getUrlPrefix, getTestRuleData, ObjectRemover } from '../../../../common/lib';
|
||||||
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
||||||
import { getSlackServer } from '../../../../common/plugins/actions_simulators/server/plugin';
|
import { getSlackServer } from '../../../../common/plugins/actions_simulators/server/plugin';
|
||||||
import { getHttpProxyServer } from '../../../../common/lib/get_proxy_server';
|
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default function executionStatusAlertTests({ getService }: FtrProviderContext) {
|
export default function executionStatusAlertTests({ getService }: FtrProviderContext) {
|
||||||
|
|
|
@ -7,9 +7,10 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
import { SavedObjectsUtils } from '@kbn/core/server';
|
import { SavedObjectsUtils } from '@kbn/core/server';
|
||||||
|
import { ESTestIndexTool } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { UserAtSpaceScenarios, Superuser } from '../../../scenarios';
|
import { UserAtSpaceScenarios, Superuser } from '../../../scenarios';
|
||||||
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
||||||
import { ESTestIndexTool, getUrlPrefix, ObjectRemover, AlertUtils } from '../../../../common/lib';
|
import { getUrlPrefix, ObjectRemover, AlertUtils } from '../../../../common/lib';
|
||||||
import { setupSpacesAndUsers } from '../../../setup';
|
import { setupSpacesAndUsers } from '../../../setup';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
|
|
@ -6,14 +6,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
import { ESTestIndexTool } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Spaces, Superuser } from '../../../scenarios';
|
import { Spaces, Superuser } from '../../../scenarios';
|
||||||
import {
|
import { getUrlPrefix, getEventLog, getTestRuleData, TaskManagerDoc } from '../../../../common/lib';
|
||||||
getUrlPrefix,
|
|
||||||
getEventLog,
|
|
||||||
getTestRuleData,
|
|
||||||
ESTestIndexTool,
|
|
||||||
TaskManagerDoc,
|
|
||||||
} from '../../../../common/lib';
|
|
||||||
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Space, User } from '../common/types';
|
import { Space, User } from '../common/types';
|
||||||
import { ES_TEST_INDEX_NAME } from '../common/lib';
|
|
||||||
|
|
||||||
const NoKibanaPrivileges: User = {
|
const NoKibanaPrivileges: User = {
|
||||||
username: 'no_kibana_privileges',
|
username: 'no_kibana_privileges',
|
||||||
|
|
|
@ -7,13 +7,9 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Spaces } from '../../scenarios';
|
import { Spaces } from '../../scenarios';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover } from '../../../common/lib';
|
||||||
ESTestIndexTool,
|
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
} from '../../../common/lib';
|
|
||||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
|
|
@ -7,14 +7,9 @@
|
||||||
import type { Client } from '@elastic/elasticsearch';
|
import type { Client } from '@elastic/elasticsearch';
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
import { IValidatedEvent, nanosToMillis } from '@kbn/event-log-plugin/server';
|
import { IValidatedEvent, nanosToMillis } from '@kbn/event-log-plugin/server';
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Spaces } from '../../scenarios';
|
import { Spaces } from '../../scenarios';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover, getEventLog } from '../../../common/lib';
|
||||||
ESTestIndexTool,
|
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
getEventLog,
|
|
||||||
} from '../../../common/lib';
|
|
||||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
|
|
@ -12,11 +12,10 @@ import { Response as SupertestResponse } from 'supertest';
|
||||||
import { RecoveredActionGroup } from '@kbn/alerting-plugin/common';
|
import { RecoveredActionGroup } from '@kbn/alerting-plugin/common';
|
||||||
import { TaskRunning, TaskRunningStage } from '@kbn/task-manager-plugin/server/task_running';
|
import { TaskRunning, TaskRunningStage } from '@kbn/task-manager-plugin/server/task_running';
|
||||||
import { ConcreteTaskInstance } from '@kbn/task-manager-plugin/server';
|
import { ConcreteTaskInstance } from '@kbn/task-manager-plugin/server';
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Space } from '../../../common/types';
|
import { Space } from '../../../common/types';
|
||||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||||
import {
|
import {
|
||||||
ESTestIndexTool,
|
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
getUrlPrefix,
|
getUrlPrefix,
|
||||||
getTestRuleData,
|
getTestRuleData,
|
||||||
ObjectRemover,
|
ObjectRemover,
|
||||||
|
|
|
@ -6,15 +6,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
import { ESTestIndexTool } from '@kbn/alerting-api-integration-helpers';
|
||||||
|
|
||||||
import { Spaces } from '../../../../scenarios';
|
import { Spaces } from '../../../../scenarios';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover, getEventLog } from '../../../../../common/lib';
|
||||||
ESTestIndexTool,
|
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
getEventLog,
|
|
||||||
} from '../../../../../common/lib';
|
|
||||||
import { createEsDocuments } from '../lib/create_test_data';
|
import { createEsDocuments } from '../lib/create_test_data';
|
||||||
|
|
||||||
const RULE_INTERVAL_SECONDS = 6;
|
const RULE_INTERVAL_SECONDS = 6;
|
||||||
|
|
|
@ -7,15 +7,10 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Spaces } from '../../../../scenarios';
|
import { Spaces } from '../../../../scenarios';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover, getEventLog } from '../../../../../common/lib';
|
||||||
ESTestIndexTool,
|
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
getEventLog,
|
|
||||||
} from '../../../../../common/lib';
|
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default function maxAlertsRuleTests({ getService }: FtrProviderContext) {
|
export default function maxAlertsRuleTests({ getService }: FtrProviderContext) {
|
||||||
|
|
|
@ -7,15 +7,10 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Spaces } from '../../../../scenarios';
|
import { Spaces } from '../../../../scenarios';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover, getEventLog } from '../../../../../common/lib';
|
||||||
ESTestIndexTool,
|
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
getEventLog,
|
|
||||||
} from '../../../../../common/lib';
|
|
||||||
import { createEsDocumentsWithGroups } from '../lib/create_test_data';
|
import { createEsDocumentsWithGroups } from '../lib/create_test_data';
|
||||||
|
|
||||||
const RULE_INTERVAL_SECONDS = 6;
|
const RULE_INTERVAL_SECONDS = 6;
|
||||||
|
|
|
@ -5,14 +5,10 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import { Spaces } from '../../../../scenarios';
|
import { Spaces } from '../../../../scenarios';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover } from '../../../../../common/lib';
|
||||||
ESTestIndexTool,
|
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
} from '../../../../../common/lib';
|
|
||||||
import { createEsDocuments, createEsDocumentsWithGroups } from '../lib/create_test_data';
|
import { createEsDocuments, createEsDocumentsWithGroups } from '../lib/create_test_data';
|
||||||
|
|
||||||
export const RULE_TYPE_ID = '.es-query';
|
export const RULE_TYPE_ID = '.es-query';
|
||||||
|
|
|
@ -7,9 +7,11 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
|
import { ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
|
|
||||||
import { Spaces } from '../../../../scenarios';
|
import { Spaces } from '../../../../scenarios';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import { ES_TEST_INDEX_NAME, getUrlPrefix, ObjectRemover } from '../../../../../common/lib';
|
import { getUrlPrefix, ObjectRemover } from '../../../../../common/lib';
|
||||||
import { createDataStream, deleteDataStream } from '../lib/create_test_data';
|
import { createDataStream, deleteDataStream } from '../lib/create_test_data';
|
||||||
import {
|
import {
|
||||||
createConnector,
|
createConnector,
|
||||||
|
|
|
@ -7,9 +7,11 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
|
import { ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
|
|
||||||
import { Spaces } from '../../../../scenarios';
|
import { Spaces } from '../../../../scenarios';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import { ES_TEST_INDEX_NAME, getUrlPrefix, ObjectRemover } from '../../../../../common/lib';
|
import { getUrlPrefix, ObjectRemover } from '../../../../../common/lib';
|
||||||
import {
|
import {
|
||||||
createConnector,
|
createConnector,
|
||||||
ES_GROUPS_TO_WRITE,
|
ES_GROUPS_TO_WRITE,
|
||||||
|
|
|
@ -7,15 +7,11 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
|
|
||||||
import { Spaces } from '../../../../scenarios';
|
import { Spaces } from '../../../../scenarios';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover, getEventLog } from '../../../../../common/lib';
|
||||||
ESTestIndexTool,
|
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
getEventLog,
|
|
||||||
} from '../../../../../common/lib';
|
|
||||||
import { createEsDocumentsWithGroups } from '../lib/create_test_data';
|
import { createEsDocumentsWithGroups } from '../lib/create_test_data';
|
||||||
import { createDataStream, deleteDataStream } from '../lib/create_test_data';
|
import { createDataStream, deleteDataStream } from '../lib/create_test_data';
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,11 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
|
|
||||||
import { Spaces } from '../../../../scenarios';
|
import { Spaces } from '../../../../scenarios';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import { ESTestIndexTool, ES_TEST_INDEX_NAME, getUrlPrefix } from '../../../../../common/lib';
|
import { getUrlPrefix } from '../../../../../common/lib';
|
||||||
|
|
||||||
const API_URI = 'internal/triggers_actions_ui/data/_fields';
|
const API_URI = 'internal/triggers_actions_ui/data/_fields';
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,11 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
|
|
||||||
import { Spaces } from '../../../../scenarios';
|
import { Spaces } from '../../../../scenarios';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import { ESTestIndexTool, ES_TEST_INDEX_NAME, getUrlPrefix } from '../../../../../common/lib';
|
import { getUrlPrefix } from '../../../../../common/lib';
|
||||||
import { createEsDocumentsWithGroups } from '../lib/create_test_data';
|
import { createEsDocumentsWithGroups } from '../lib/create_test_data';
|
||||||
import { createDataStream, deleteDataStream } from '../lib/create_test_data';
|
import { createDataStream, deleteDataStream } from '../lib/create_test_data';
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,11 @@
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
|
||||||
import { TimeSeriesQuery } from '@kbn/triggers-actions-ui-plugin/server';
|
import { TimeSeriesQuery } from '@kbn/triggers-actions-ui-plugin/server';
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
|
|
||||||
import { Spaces } from '../../../../scenarios';
|
import { Spaces } from '../../../../scenarios';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import { ESTestIndexTool, ES_TEST_INDEX_NAME, getUrlPrefix } from '../../../../../common/lib';
|
import { getUrlPrefix } from '../../../../../common/lib';
|
||||||
|
|
||||||
import { createEsDocumentsWithGroups } from '../lib/create_test_data';
|
import { createEsDocumentsWithGroups } from '../lib/create_test_data';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
import type { Client } from '@elastic/elasticsearch';
|
import type { Client } from '@elastic/elasticsearch';
|
||||||
import { times } from 'lodash';
|
import { times } from 'lodash';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '../../../../../common/lib';
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
|
|
||||||
// default end date
|
// default end date
|
||||||
export const END_DATE = '2020-01-01T00:00:00Z';
|
export const END_DATE = '2020-01-01T00:00:00Z';
|
||||||
|
|
|
@ -9,15 +9,9 @@ import expect from '@kbn/expect';
|
||||||
import { flatten } from 'lodash';
|
import { flatten } from 'lodash';
|
||||||
import { IValidatedEvent } from '@kbn/event-log-plugin/server';
|
import { IValidatedEvent } from '@kbn/event-log-plugin/server';
|
||||||
import { DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT } from '@kbn/alerting-plugin/server/config';
|
import { DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT } from '@kbn/alerting-plugin/server/config';
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Spaces } from '../../scenarios';
|
import { Spaces } from '../../scenarios';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover, getTestRuleData, getEventLog } from '../../../common/lib';
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
getTestRuleData,
|
|
||||||
getEventLog,
|
|
||||||
ESTestIndexTool,
|
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
} from '../../../common/lib';
|
|
||||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
|
|
@ -7,14 +7,9 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
import { IValidatedEvent, nanosToMillis } from '@kbn/event-log-plugin/server';
|
import { IValidatedEvent, nanosToMillis } from '@kbn/event-log-plugin/server';
|
||||||
|
import { ESTestIndexTool } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Spaces } from '../../scenarios';
|
import { Spaces } from '../../scenarios';
|
||||||
import {
|
import { getUrlPrefix, getTestRuleData, ObjectRemover, getEventLog } from '../../../common/lib';
|
||||||
getUrlPrefix,
|
|
||||||
getTestRuleData,
|
|
||||||
ObjectRemover,
|
|
||||||
getEventLog,
|
|
||||||
ESTestIndexTool,
|
|
||||||
} from '../../../common/lib';
|
|
||||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
|
|
@ -6,15 +6,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
import { ESTestIndexTool } from '@kbn/alerting-api-integration-helpers';
|
||||||
|
|
||||||
import { Spaces } from '../../scenarios';
|
import { Spaces } from '../../scenarios';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover, getTestRuleData, getEventLog } from '../../../common/lib';
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
getTestRuleData,
|
|
||||||
getEventLog,
|
|
||||||
ESTestIndexTool,
|
|
||||||
} from '../../../common/lib';
|
|
||||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
|
|
@ -6,15 +6,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
import { ESTestIndexTool } from '@kbn/alerting-api-integration-helpers';
|
||||||
|
|
||||||
import { Spaces } from '../../scenarios';
|
import { Spaces } from '../../scenarios';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover, getTestRuleData, getEventLog } from '../../../common/lib';
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
getTestRuleData,
|
|
||||||
getEventLog,
|
|
||||||
ESTestIndexTool,
|
|
||||||
} from '../../../common/lib';
|
|
||||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
|
|
@ -12,13 +12,9 @@ import { Datafeed, Job } from '@kbn/ml-plugin/common/types/anomaly_detection_job
|
||||||
import { MlAnomalyDetectionAlertParams } from '@kbn/ml-plugin/common/types/alerts';
|
import { MlAnomalyDetectionAlertParams } from '@kbn/ml-plugin/common/types/alerts';
|
||||||
import { ANOMALY_SCORE_MATCH_GROUP_ID } from '@kbn/ml-plugin/server/lib/alerts/register_anomaly_detection_alert_type';
|
import { ANOMALY_SCORE_MATCH_GROUP_ID } from '@kbn/ml-plugin/server/lib/alerts/register_anomaly_detection_alert_type';
|
||||||
import { ML_ALERT_TYPES } from '@kbn/ml-plugin/common/constants/alerts';
|
import { ML_ALERT_TYPES } from '@kbn/ml-plugin/common/constants/alerts';
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Spaces } from '../../../../scenarios';
|
import { Spaces } from '../../../../scenarios';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover } from '../../../../../common/lib';
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
ESTestIndexTool,
|
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
} from '../../../../../common/lib';
|
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
|
|
||||||
const ACTION_TYPE_ID = '.index';
|
const ACTION_TYPE_ID = '.index';
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
|
import { ESTestIndexTool } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { Spaces } from '../../scenarios';
|
import { Spaces } from '../../scenarios';
|
||||||
import {
|
import {
|
||||||
getUrlPrefix,
|
getUrlPrefix,
|
||||||
getTestRuleData,
|
getTestRuleData,
|
||||||
ObjectRemover,
|
ObjectRemover,
|
||||||
createWaitForExecutionCount,
|
createWaitForExecutionCount,
|
||||||
ESTestIndexTool,
|
|
||||||
getEventLog,
|
getEventLog,
|
||||||
} from '../../../common/lib';
|
} from '../../../common/lib';
|
||||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||||
|
|
|
@ -7,13 +7,9 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
import { PutTransformsRequestSchema } from '@kbn/transform-plugin/common/api_schemas/transforms';
|
import { PutTransformsRequestSchema } from '@kbn/transform-plugin/common/api_schemas/transforms';
|
||||||
|
import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers';
|
||||||
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
|
||||||
import {
|
import { getUrlPrefix, ObjectRemover } from '../../../../../common/lib';
|
||||||
ES_TEST_INDEX_NAME,
|
|
||||||
ESTestIndexTool,
|
|
||||||
getUrlPrefix,
|
|
||||||
ObjectRemover,
|
|
||||||
} from '../../../../../common/lib';
|
|
||||||
import { Spaces } from '../../../../scenarios';
|
import { Spaces } from '../../../../scenarios';
|
||||||
|
|
||||||
const ACTION_TYPE_ID = '.index';
|
const ACTION_TYPE_ID = '.index';
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"target/**/*",
|
"target/**/*",
|
||||||
"*/plugins/**/*",
|
"*/plugins/**/*",
|
||||||
|
"*/packages/**/*",
|
||||||
|
"*/*/packages/**/*",
|
||||||
],
|
],
|
||||||
"kbn_references": [
|
"kbn_references": [
|
||||||
{ "path": "../../test/tsconfig.json" },
|
{ "path": "../../test/tsconfig.json" },
|
||||||
|
@ -110,5 +112,6 @@
|
||||||
"@kbn/journeys",
|
"@kbn/journeys",
|
||||||
"@kbn/alerting-fixture-plugin",
|
"@kbn/alerting-fixture-plugin",
|
||||||
"@kbn/stdio-dev-helpers",
|
"@kbn/stdio-dev-helpers",
|
||||||
|
"@kbn/alerting-api-integration-helpers",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -2729,6 +2729,10 @@
|
||||||
version "0.0.0"
|
version "0.0.0"
|
||||||
uid ""
|
uid ""
|
||||||
|
|
||||||
|
"@kbn/alerting-api-integration-helpers@link:x-pack/test/alerting_api_integration/packages/helpers":
|
||||||
|
version "0.0.0"
|
||||||
|
uid ""
|
||||||
|
|
||||||
"@kbn/alerts@link:packages/kbn-alerts":
|
"@kbn/alerts@link:packages/kbn-alerts":
|
||||||
version "0.0.0"
|
version "0.0.0"
|
||||||
uid ""
|
uid ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue