From e1f83ef7f8a4fdca9230f65d1b187cf22bdeeaff Mon Sep 17 00:00:00 2001 From: Gidi Meir Morris Date: Mon, 4 May 2020 09:56:01 +0100 Subject: [PATCH] reapplied changes after merge conflict --- .../fixtures/plugins/actions_simulators/server/plugin.ts | 2 ++ .../actions_simulators/server/servicenow_simulation.ts | 8 ++------ .../fixtures/plugins/actions_simulators_legacy/index.ts | 2 ++ .../jira_simulation.ts | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename x-pack/test/alerting_api_integration/common/fixtures/plugins/{actions_simulators => actions_simulators_legacy}/jira_simulation.ts (100%) diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/plugin.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/plugin.ts index f78a6aba2ce4c..a14e59ec72d6f 100644 --- a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/plugin.ts +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/plugin.ts @@ -18,6 +18,7 @@ export enum ExternalServiceSimulator { PAGERDUTY = 'pagerduty', SERVICENOW = 'servicenow', SLACK = 'slack', + JIRA = 'jira', WEBHOOK = 'webhook', } @@ -30,6 +31,7 @@ export function getAllExternalServiceSimulatorPaths(): string[] { getExternalServiceSimulatorPath(service) ); allPaths.push(`/api/_${NAME}/${ExternalServiceSimulator.SERVICENOW}/api/now/v2/table/incident`); + allPaths.push(`/api/_${NAME}/${ExternalServiceSimulator.JIRA}/rest/api/2/issue`); return allPaths; } diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/servicenow_simulation.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/servicenow_simulation.ts index 57e04500a953a..4bf8216aed26f 100644 --- a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/servicenow_simulation.ts +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/server/servicenow_simulation.ts @@ -48,11 +48,7 @@ export function initPlugin(router: IRouter, path: string) { options: { authRequired: false, }, - validate: { - params: schema.object({ - id: schema.string(), - }), - }, + validate: {}, }, async function( context: RequestHandlerContext, @@ -67,7 +63,7 @@ export function initPlugin(router: IRouter, path: string) { router.get( { - path: `${path}/api/now/v2/table/incident`, + path: `${path}/api/now/v2/table/incident/{id}`, options: { authRequired: false, }, diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators_legacy/index.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators_legacy/index.ts index 4219d99b6c43b..725ccce92bc9b 100644 --- a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators_legacy/index.ts +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators_legacy/index.ts @@ -12,6 +12,7 @@ import { import { initPlugin as initWebhook } from './webhook_simulation'; import { initPlugin as initSlack } from './slack_simulation'; +import { initPlugin as initJira } from './jira_simulation'; // eslint-disable-next-line import/no-default-export export default function(kibana: any) { @@ -21,6 +22,7 @@ export default function(kibana: any) { init: (server: Hapi.Server) => { initWebhook(server, getExternalServiceSimulatorPath(ExternalServiceSimulator.WEBHOOK)); initSlack(server, getExternalServiceSimulatorPath(ExternalServiceSimulator.SLACK)); + initJira(server, getExternalServiceSimulatorPath(ExternalServiceSimulator.JIRA)); }, }); } diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/jira_simulation.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators_legacy/jira_simulation.ts similarity index 100% rename from x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators/jira_simulation.ts rename to x-pack/test/alerting_api_integration/common/fixtures/plugins/actions_simulators_legacy/jira_simulation.ts