Skip to content

Commit

Permalink
[Connectors] Split functional tests by connector type (elastic#141956)
Browse files Browse the repository at this point in the history
* Renaming folder

* Renaming folder

* Moving xmatters to stack

* Moving xmatters to stack

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
2 people authored and WafaaNasr committed Oct 11, 2022
1 parent 3f18f3f commit f717d03
Show file tree
Hide file tree
Showing 37 changed files with 107 additions and 103 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ x-pack/examples/files_example @elastic/kibana-app-services
/x-pack/plugins/stack_connectors/public/connector_types/cases/ @elastic/response-ops-cases
/x-pack/plugins/stack_connectors/server/connector_types/cases/ @elastic/response-ops-cases
/x-pack/test/alerting_api_integration/ @elastic/response-ops
/x-pack/test/alerting_api_integration/basic/tests/actions/connector_types/stack/ @elastic/response-ops-execution
/x-pack/test/alerting_api_integration/basic/tests/actions/connector_types/cases/ @elastic/response-ops-cases
/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/stack/ @elastic/response-ops-execution
/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/cases/ @elastic/response-ops-cases
/x-pack/test/plugin_api_integration/test_suites/task_manager/ @elastic/response-ops
/x-pack/plugins/triggers_actions_ui/ @elastic/response-ops
/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/ @elastic/response-ops
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';

import {
ExternalServiceSimulator,
getExternalServiceSimulatorPath,
} from '../../../../common/fixtures/plugins/actions_simulators/server/plugin';
} from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function casesWebhookTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';

import {
getExternalServiceSimulatorPath,
ExternalServiceSimulator,
} from '../../../../common/fixtures/plugins/actions_simulators/server/plugin';
} from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function jiraTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';

import {
getExternalServiceSimulatorPath,
ExternalServiceSimulator,
} from '../../../../common/fixtures/plugins/actions_simulators/server/plugin';
} from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function resilientTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';

import {
getExternalServiceSimulatorPath,
ExternalServiceSimulator,
} from '../../../../common/fixtures/plugins/actions_simulators/server/plugin';
} from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function servicenowTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import {
ExternalServiceSimulator,
getExternalServiceSimulatorPath,
} from '../../../../common/fixtures/plugins/actions_simulators/server/plugin';
} from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function swimlaneTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';

// eslint-disable-next-line import/no-default-export
export default function emailTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';

// eslint-disable-next-line import/no-default-export
export default function indexTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';

// eslint-disable-next-line import/no-default-export
export default function pagerdutyTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';

// eslint-disable-next-line import/no-default-export
export default function serverLogTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import http from 'http';
import getPort from 'get-port';
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';

import { getSlackServer } from '../../../../common/fixtures/plugins/actions_simulators/server/plugin';
import { getSlackServer } from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function slackTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import http from 'http';
import getPort from 'get-port';
import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import { getWebhookServer } from '../../../../common/fixtures/plugins/actions_simulators/server/plugin';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { getWebhookServer } from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function webhookTest({ getService }: FtrProviderContext) {
Expand Down
24 changes: 12 additions & 12 deletions x-pack/test/alerting_api_integration/basic/tests/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
import { FtrProviderContext } from '../../../common/ftr_provider_context';

// eslint-disable-next-line import/no-default-export
export default function actionsTests({ loadTestFile }: FtrProviderContext) {
describe('Actions', () => {
loadTestFile(require.resolve('./builtin_action_types/cases_webhook'));
loadTestFile(require.resolve('./builtin_action_types/email'));
loadTestFile(require.resolve('./builtin_action_types/es_index'));
loadTestFile(require.resolve('./builtin_action_types/jira'));
loadTestFile(require.resolve('./builtin_action_types/pagerduty'));
loadTestFile(require.resolve('./builtin_action_types/swimlane'));
loadTestFile(require.resolve('./builtin_action_types/server_log'));
loadTestFile(require.resolve('./builtin_action_types/servicenow'));
loadTestFile(require.resolve('./builtin_action_types/slack'));
loadTestFile(require.resolve('./builtin_action_types/webhook'));
export default function connectorsTests({ loadTestFile }: FtrProviderContext) {
describe('Connectors', () => {
loadTestFile(require.resolve('./connector_types/cases/cases_webhook'));
loadTestFile(require.resolve('./connector_types/cases/jira'));
loadTestFile(require.resolve('./connector_types/cases/servicenow'));
loadTestFile(require.resolve('./connector_types/cases/swimlane'));
loadTestFile(require.resolve('./connector_types/stack/email'));
loadTestFile(require.resolve('./connector_types/stack/es_index'));
loadTestFile(require.resolve('./connector_types/stack/pagerduty'));
loadTestFile(require.resolve('./connector_types/stack/server_log'));
loadTestFile(require.resolve('./connector_types/stack/slack'));
loadTestFile(require.resolve('./connector_types/stack/webhook'));
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import httpProxy from 'http-proxy';
import expect from '@kbn/expect';

import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { getHttpProxyServer } from '../../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';

import {
getExternalServiceSimulatorPath,
ExternalServiceSimulator,
} from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';
} from '../../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function casesWebhookTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import httpProxy from 'http-proxy';
import expect from '@kbn/expect';

import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { getHttpProxyServer } from '../../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';

import {
getExternalServiceSimulatorPath,
ExternalServiceSimulator,
} from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';
} from '../../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function jiraTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import httpProxy from 'http-proxy';
import expect from '@kbn/expect';

import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { getHttpProxyServer } from '../../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';

import {
getExternalServiceSimulatorPath,
ExternalServiceSimulator,
} from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';
} from '../../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function resilientTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { asyncForEach } from '@kbn/std';
import getPort from 'get-port';
import http from 'http';

import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { getServiceNowServer } from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';
import { getHttpProxyServer } from '../../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';
import { getServiceNowServer } from '../../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function serviceNowITOMTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { asyncForEach } from '@kbn/std';
import getPort from 'get-port';
import http from 'http';

import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { getServiceNowServer } from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';
import { getHttpProxyServer } from '../../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';
import { getServiceNowServer } from '../../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function serviceNowITSMTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { asyncForEach } from '@kbn/std';
import getPort from 'get-port';
import http from 'http';

import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { getServiceNowServer } from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';
import { getHttpProxyServer } from '../../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';
import { getServiceNowServer } from '../../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function serviceNowSIRTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import expect from '@kbn/expect';
import getPort from 'get-port';
import http from 'http';

import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { getSwimlaneServer } from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';
import { getHttpProxyServer } from '../../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';
import { getSwimlaneServer } from '../../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function swimlaneTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

import expect from '@kbn/expect';

import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';
import {
ExternalServiceSimulator,
getExternalServiceSimulatorPath,
} from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';
} from '../../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function emailTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import type { Client } from '@elastic/elasticsearch';
import expect from '@kbn/expect';

import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';

const ES_TEST_INDEX_NAME = 'functional-test-actions-index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import type { Client } from '@elastic/elasticsearch';
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';

// from: x-pack/test/alerting_api_integration/common/config.ts
const ACTION_ID = 'preconfigured-es-index-action';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import httpProxy from 'http-proxy';
import expect from '@kbn/expect';

import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { getHttpProxyServer } from '../../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';

import {
getExternalServiceSimulatorPath,
ExternalServiceSimulator,
} from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';
} from '../../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function pagerdutyTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import expect from '@kbn/expect';

import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';

// eslint-disable-next-line import/no-default-export
export default function serverLogTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import httpProxy from 'http-proxy';
import expect from '@kbn/expect';
import http from 'http';
import getPort from 'get-port';
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { getHttpProxyServer } from '../../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';

import { getSlackServer } from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';
import { getSlackServer } from '../../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function slackTest({ getService }: FtrProviderContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import http from 'http';
import expect from '@kbn/expect';
import { URL, format as formatUrl } from 'url';
import getPort from 'get-port';
import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { getHttpProxyServer } from '../../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';
import {
getExternalServiceSimulatorPath,
ExternalServiceSimulator,
getWebhookServer,
} from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';
} from '../../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

const defaultValues: Record<string, any> = {
headers: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import httpProxy from 'http-proxy';
import expect from '@kbn/expect';

import { getHttpProxyServer } from '../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../common/ftr_provider_context';
import { getHttpProxyServer } from '../../../../../../common/lib/get_proxy_server';
import { FtrProviderContext } from '../../../../../../common/ftr_provider_context';

import {
getExternalServiceSimulatorPath,
ExternalServiceSimulator,
} from '../../../../../common/fixtures/plugins/actions_simulators/server/plugin';
} from '../../../../../../common/fixtures/plugins/actions_simulators/server/plugin';

// eslint-disable-next-line import/no-default-export
export default function xmattersTest({ getService }: FtrProviderContext) {
Expand Down
Loading

0 comments on commit f717d03

Please sign in to comment.