Skip to content

Commit

Permalink
More test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
madirey committed Nov 5, 2021
1 parent 7784c75 commit b0f9b8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
EqlCreateSchema,
ThresholdCreateSchema,
} from '../../../../../plugins/security_solution/common/detection_engine/schemas/request';
import { ALERT_THRESHOLD_RESULT } from '../../../../../plugins/security_solution/common/field_maps/field_names';

import { FtrProviderContext } from '../../../common/ftr_provider_context';
import {
Expand Down Expand Up @@ -131,7 +132,7 @@ export default ({ getService }: FtrProviderContext) => {
await waitForSignalsToBePresent(supertest, log, 1, [id]);
const signalsOpen = await getSignalsById(supertest, log, id);
const hits = signalsOpen.hits.hits
.map((hit) => hit._source?.threshold_result ?? null)
.map((hit) => hit._source?.[ALERT_THRESHOLD_RESULT] ?? null)
.sort();
expect(hits).to.eql([
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
EqlCreateSchema,
ThresholdCreateSchema,
} from '../../../../../plugins/security_solution/common/detection_engine/schemas/request';
import { ALERT_THRESHOLD_RESULT } from '../../../../../plugins/security_solution/common/field_maps/field_names';

import { FtrProviderContext } from '../../../common/ftr_provider_context';
import {
Expand Down Expand Up @@ -144,7 +145,7 @@ export default ({ getService }: FtrProviderContext) => {
await waitForSignalsToBePresent(supertest, log, 1, [id]);
const signalsOpen = await getSignalsById(supertest, log, id);
const hits = signalsOpen.hits.hits
.map((hit) => hit._source?.threshold_result ?? null)
.map((hit) => hit._source?.[ALERT_THRESHOLD_RESULT] ?? null)
.sort();
expect(hits).to.eql([
{
Expand Down

0 comments on commit b0f9b8c

Please sign in to comment.