From d1ef6ef2a9a79fbcf5e1f45f2ffbefdbc020fded Mon Sep 17 00:00:00 2001 From: Gidi Meir Morris Date: Thu, 2 Jan 2020 08:48:12 +0000 Subject: [PATCH] cleaned up naming --- .../test/alerting_api_integration/common/lib/alert_utils.ts | 6 +++--- .../alerting_api_integration/common/lib/test_assertions.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/test/alerting_api_integration/common/lib/alert_utils.ts b/x-pack/test/alerting_api_integration/common/lib/alert_utils.ts index 7c86ff9fb150c..c47649544f9a7 100644 --- a/x-pack/test/alerting_api_integration/common/lib/alert_utils.ts +++ b/x-pack/test/alerting_api_integration/common/lib/alert_utils.ts @@ -17,7 +17,7 @@ export interface AlertUtilsOpts { objectRemover?: ObjectRemover; } -export interface CreateAlwaysFiringActionOpts { +export interface CreateAlertWithActionOpts { indexRecordActionId?: string; objectRemover?: ObjectRemover; overwrites?: Record; @@ -159,7 +159,7 @@ export class AlertUtils { overwrites = {}, indexRecordActionId, reference, - }: CreateAlwaysFiringActionOpts) { + }: CreateAlertWithActionOpts) { const objRemover = objectRemover || this.objectRemover; const actionId = indexRecordActionId || this.indexRecordActionId; @@ -213,7 +213,7 @@ export class AlertUtils { overwrites = {}, indexRecordActionId, reference, - }: CreateAlwaysFiringActionOpts) { + }: CreateAlertWithActionOpts) { const objRemover = objectRemover || this.objectRemover; const actionId = indexRecordActionId || this.indexRecordActionId; diff --git a/x-pack/test/alerting_api_integration/common/lib/test_assertions.ts b/x-pack/test/alerting_api_integration/common/lib/test_assertions.ts index 000ff833a5d17..9495dd4cfae82 100644 --- a/x-pack/test/alerting_api_integration/common/lib/test_assertions.ts +++ b/x-pack/test/alerting_api_integration/common/lib/test_assertions.ts @@ -7,11 +7,11 @@ import expect from '@kbn/expect'; export function ensureDatetimeIsWithinRange( - scheduledRunTime: number, + date: number, expectedDiff: number, buffer: number = 10000 ) { - const diff = scheduledRunTime - Date.now(); + const diff = date - Date.now(); expect(diff).to.be.greaterThan(expectedDiff - buffer); expect(diff).to.be.lessThan(expectedDiff + buffer); }