Skip to content

Commit

Permalink
Fixed typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankHassanabad committed Jun 5, 2021
1 parent 79250f1 commit 8a876c2
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
*/

import expect from '@kbn/expect';
import {
EqlCreateSchema,
ThresholdCreateSchema,
} from '../../../../plugins/security_solution/common/detection_engine/schemas/request';

import { FtrProviderContext } from '../../common/ftr_provider_context';
import {
Expand All @@ -27,6 +23,9 @@ import {
export default ({ getService }: FtrProviderContext) => {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
interface HostAlias {
name: string;
}

describe('Tests involving aliases of source indexes and the signals index', () => {
beforeEach(async () => {
Expand All @@ -46,7 +45,9 @@ export default ({ getService }: FtrProviderContext) => {
await waitForRuleSuccessOrStatus(supertest, id);
await waitForSignalsToBePresent(supertest, 4, [id]);
const signalsOpen = await getSignalsById(supertest, id);
const hits = signalsOpen.hits.hits.map((signal) => signal._source.host_alias.name);
const hits = signalsOpen.hits.hits.map(
(signal) => (signal._source.host_alias as HostAlias).name
);
expect(hits).to.eql(['host name 1', 'host name 2', 'host name 3', 'host name 4']);
});

Expand All @@ -57,7 +58,7 @@ export default ({ getService }: FtrProviderContext) => {
await waitForRuleSuccessOrStatus(supertest, id);
await waitForSignalsToBePresent(supertest, 4, [id]);
const signalsOpen = await getSignalsById(supertest, id);
const hits = signalsOpen.hits.hits.map((signal) => signal._source.host.name);
const hits = signalsOpen.hits.hits.map((signal) => (signal._source.host as HostAlias).name);
expect(hits).to.eql(['host name 1', 'host name 2', 'host name 3', 'host name 4']);
});
});
Expand Down

0 comments on commit 8a876c2

Please sign in to comment.