Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisronline committed Oct 1, 2020
1 parent c262c6a commit 08374e1
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand All @@ -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',
Expand Down Expand Up @@ -144,6 +144,7 @@ describe('MissingMonitoringDataAlert', () => {
expect(replaceState).toHaveBeenCalledWith({
alertStates: [
{
ccs: undefined,
cluster: { clusterUuid, clusterName },
gapDuration,
stackProduct,
Expand All @@ -162,7 +163,7 @@ describe('MissingMonitoringDataAlert', () => {
startToken: '#start_link',
endToken: '#end_link',
type: 'link',
url: 'elasticsearch/nodes?_g=(cluster_uuid:abc123)',
url: 'elasticsearch/nodes',
},
],
},
Expand All @@ -187,6 +188,7 @@ describe('MissingMonitoringDataAlert', () => {
},
},
{
ccs: undefined,
cluster: { clusterUuid, clusterName },
gapDuration: gapDuration + 10,
stackProduct: 'kibana',
Expand All @@ -205,7 +207,7 @@ describe('MissingMonitoringDataAlert', () => {
startToken: '#start_link',
endToken: '#end_link',
type: 'link',
url: 'kibana/instances?_g=(cluster_uuid:abc123)',
url: 'kibana/instances',
},
],
},
Expand Down

0 comments on commit 08374e1

Please sign in to comment.