diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_scoring_task_execution.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_scoring_task_execution.ts index f6d0056a8ff5c..15aad6a1508cf 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_scoring_task_execution.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_scoring_task_execution.ts @@ -24,6 +24,7 @@ import { cleanRiskEngineConfig, waitForRiskEngineTaskToBeGone, deleteRiskScoreIndices, + clearTransforms, } from './utils'; // eslint-disable-next-line import/no-default-export @@ -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 () => { @@ -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', () => { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts index d0efedc534b00..2e7888fe00591 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts @@ -17,6 +17,7 @@ import { waitForRiskScoresToBePresent, riskEngineRouteHelpersFactory, cleanRiskEngineConfig, + clearTransforms, } from './utils'; import { dataGeneratorFactory } from '../../../utils/data_generator'; @@ -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', () => { @@ -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 () => {