From 1dd0387b2f1727fabf2561cef9761eb4cc86a8d3 Mon Sep 17 00:00:00 2001 From: Nikita Indik Date: Wed, 4 Dec 2024 10:48:16 +0100 Subject: [PATCH] Move `deleteAllPrebuiltRuleAssets` to fix test failure in Serverless --- .../rule_patch/basic_license_essentials_tier/patch_rules.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/basic_license_essentials_tier/patch_rules.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/basic_license_essentials_tier/patch_rules.ts index a47f84ef930a..f4536821dcaa 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/basic_license_essentials_tier/patch_rules.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/basic_license_essentials_tier/patch_rules.ts @@ -34,7 +34,6 @@ export default ({ getService }: FtrProviderContext) => { describe('patch rules', () => { beforeEach(async () => { await deleteAllRules(supertest, log); - await deleteAllPrebuiltRuleAssets(es, log); }); it('should patch a single rule property of name using a rule_id', async () => { @@ -233,8 +232,8 @@ export default ({ getService }: FtrProviderContext) => { }); }); - // Unskip: https://github.com/elastic/kibana/issues/195921 it('@skipInServerlessMKI throws an error if rule has external rule source and non-customizable fields are changed', async () => { + await deleteAllPrebuiltRuleAssets(es, log); // Install base prebuilt detection rule await createHistoricalPrebuiltRuleAssetSavedObjects(es, [ createRuleAssetSavedObject({ rule_id: 'rule-1', author: ['elastic'] }),