Skip to content

Commit

Permalink
clear transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
nkhristinin committed Oct 12, 2023
1 parent 723e544 commit fa2fe46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
cleanRiskEngineConfig,
waitForRiskEngineTaskToBeGone,
deleteRiskScoreIndices,
clearTransforms,
} from './utils';

// eslint-disable-next-line import/no-default-export
Expand Down Expand Up @@ -62,6 +63,7 @@ export default ({ getService }: FtrProviderContext): void => {
await deleteAllRiskScores(log, es);
await deleteAllAlerts(supertest, log, es);
await deleteAllRules(supertest, log);
await clearTransforms({ es, log });
});

afterEach(async () => {
Expand All @@ -70,6 +72,7 @@ export default ({ getService }: FtrProviderContext): void => {
await deleteAllRiskScores(log, es);
await deleteAllAlerts(supertest, log, es);
await deleteAllRules(supertest, log);
await clearTransforms({ es, log });
});

describe('with some alerts containing hosts', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
waitForRiskScoresToBePresent,
riskEngineRouteHelpersFactory,
cleanRiskEngineConfig,
clearTransforms,
} from './utils';
import { dataGeneratorFactory } from '../../../utils/data_generator';

Expand Down Expand Up @@ -53,6 +54,7 @@ export default ({ getService }: FtrProviderContext) => {
await deleteRiskScoreIndices({ log, es });
await deleteAllAlerts(supertest, log, es);
await deleteAllRules(supertest, log);
await clearTransforms({ es, log });
});

describe('Risk engine not enabled', () => {
Expand Down Expand Up @@ -108,6 +110,7 @@ export default ({ getService }: FtrProviderContext) => {
await deleteRiskScoreIndices({ log, es });
await deleteAllAlerts(supertest, log, es);
await deleteAllRules(supertest, log);
await clearTransforms({ es, log });
});

it('should return riskEngineMetrics with expected values', async () => {
Expand Down

0 comments on commit fa2fe46

Please sign in to comment.