diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/create_rule_exceptions.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/create_rule_exceptions.ts index 3cedcfdc091a2b5..8b13aa64ac6b28a 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/create_rule_exceptions.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/create_rule_exceptions.ts @@ -168,7 +168,7 @@ export default ({ getService }: FtrProviderContext) => { }); it('adds exception items to rule default exception list', async () => { - const username = utils.getUsername(); + const username = await utils.getUsername(); // create default exception list const exceptionList: CreateExceptionListSchema = { ...getCreateExceptionListMinimalSchemaMock(), diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/trial_license_complete_tier/patch_rules_bulk.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/trial_license_complete_tier/patch_rules_bulk.ts index 58eae4a424783c5..7e496ea73194d59 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/trial_license_complete_tier/patch_rules_bulk.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/trial_license_complete_tier/patch_rules_bulk.ts @@ -204,13 +204,11 @@ export default ({ getService }: FtrProviderContext) => { const sidecarActionsPostResults = await getLegacyActionSO(es); expect(sidecarActionsPostResults.hits.hits.length).to.eql(0); + const username = await utils.getUsername(); // @ts-expect-error body.forEach((response) => { const bodyToCompare = removeServerGeneratedProperties(response); - const outputRule = updateUsername( - getSimpleRuleOutput(response.rule_id, false), - await utils.getUsername() - ); + const outputRule = updateUsername(getSimpleRuleOutput(response.rule_id, false), username); outputRule.actions = [ {