From 08374e1a02ee791510f730fd31d4fcf81ae85370 Mon Sep 17 00:00:00 2001 From: chrisronline Date: Thu, 1 Oct 2020 09:52:01 -0400 Subject: [PATCH] Fix tests --- .../alerts/missing_monitoring_data_alert.test.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/monitoring/server/alerts/missing_monitoring_data_alert.test.ts b/x-pack/plugins/monitoring/server/alerts/missing_monitoring_data_alert.test.ts index b0d1b93e72822..4c06d9718c455 100644 --- a/x-pack/plugins/monitoring/server/alerts/missing_monitoring_data_alert.test.ts +++ b/x-pack/plugins/monitoring/server/alerts/missing_monitoring_data_alert.test.ts @@ -27,6 +27,8 @@ describe('MissingMonitoringDataAlert', () => { expect(alert.defaultParams).toStrictEqual({ limit: '1d', duration: '5m' }); // @ts-ignore expect(alert.actionVariables).toStrictEqual([ + { name: 'stackProducts', description: 'The stack products missing monitoring data.' }, + { name: 'count', description: 'The number of stack products missing monitoring data.' }, { name: 'internalShortMessage', description: 'The short internal message generated by Elastic.', @@ -36,9 +38,7 @@ describe('MissingMonitoringDataAlert', () => { description: 'The full internal message generated by Elastic.', }, { name: 'state', description: 'The current state of the alert.' }, - { name: 'stackProducts', description: 'The stack products missing monitoring data.' }, - { name: 'count', description: 'The number of stack products missing monitoring data.' }, - { name: 'clusterName', description: 'The cluster to which the stack products belong.' }, + { name: 'clusterName', description: 'The cluster to which the nodes belong.' }, { name: 'action', description: 'The recommended action for this alert.' }, { name: 'actionPlain', @@ -144,6 +144,7 @@ describe('MissingMonitoringDataAlert', () => { expect(replaceState).toHaveBeenCalledWith({ alertStates: [ { + ccs: undefined, cluster: { clusterUuid, clusterName }, gapDuration, stackProduct, @@ -162,7 +163,7 @@ describe('MissingMonitoringDataAlert', () => { startToken: '#start_link', endToken: '#end_link', type: 'link', - url: 'elasticsearch/nodes?_g=(cluster_uuid:abc123)', + url: 'elasticsearch/nodes', }, ], }, @@ -187,6 +188,7 @@ describe('MissingMonitoringDataAlert', () => { }, }, { + ccs: undefined, cluster: { clusterUuid, clusterName }, gapDuration: gapDuration + 10, stackProduct: 'kibana', @@ -205,7 +207,7 @@ describe('MissingMonitoringDataAlert', () => { startToken: '#start_link', endToken: '#end_link', type: 'link', - url: 'kibana/instances?_g=(cluster_uuid:abc123)', + url: 'kibana/instances', }, ], },