Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
doakalexi committed Jul 25, 2023
1 parent eaf446a commit c99ee36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/actions/server/usage/actions_telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ export async function getExecutionsPerDayCount(
countFailedByType: Record<string, number>;
avgExecutionTime: number;
avgExecutionTimeByType: Record<string, number>;
countRunOutcomeByConnectorType: Record<string, number>;
countRunOutcomeByConnectorType: Record<string, Record<string, number>>;
}> {
const scriptedMetric = {
scripted_metric: {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/actions/server/usage/task_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const stateSchemaByVersion = {
avg_execution_time_by_type_per_day: schema.recordOf(schema.string(), schema.number()),
count_connector_types_by_action_run_outcome_per_day: schema.recordOf(
schema.string(),
schema.number()
schema.recordOf(schema.string(), schema.number())
),
}),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ export default function createAlertingAndActionsTelemetryTests({ getService }: F
const taskState = telemetryTask!._source!.task?.state;
expect(taskState).not.to.be(undefined);
actionsTelemetry = JSON.parse(taskState!);
expect(actionsTelemetry.runs).to.equal(2);
expect(actionsTelemetry.runs > 0).to.be(true);
expect(actionsTelemetry.count_total).to.equal(21);
});

Expand All @@ -473,7 +473,7 @@ export default function createAlertingAndActionsTelemetryTests({ getService }: F
const taskState = telemetryTask!._source!.task?.state;
expect(taskState).not.to.be(undefined);
alertingTelemetry = JSON.parse(taskState!);
expect(alertingTelemetry.runs).to.equal(2);
expect(alertingTelemetry.runs > 0).to.be(true);
expect(alertingTelemetry.count_total).to.equal(12);
});

Expand Down

0 comments on commit c99ee36

Please sign in to comment.