Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution][API testing] Move and restructures Lists APIS #171992

Merged
merged 20 commits into from
Nov 28, 2023

Conversation

WafaaNasr
Copy link
Contributor

@WafaaNasr WafaaNasr commented Nov 27, 2023

Summary

Following the initial work in this #166755

  • Addresses part of [Security Solution] Restructure API integration tests into meaningful groups that run in parallel on CI #151902 for List APIs tests

  • Added a new folder under the security_solution_api_integration called lists_and_exception_lists to hold the lists and exception lists tests, and split the List APIs into two groups since the execution time in Serverless was close to 30 mins

  • Modified the x-pack/plugins/lists/common/schemas/response/exception_list_item_schema.mock.ts, x-pack/plugins/lists/common/schemas/response/exception_list_schema.mock.ts , x-pack/plugins/lists/common/schemas/response/list_item_schema.mock.ts, x-pack/plugins/lists/common/schemas/response/list_schema.mock.ts to accept elastic user input because it changes in ESS and Serverless

  • Deleted the x-pack/test/lists_api_integration folder

  • Moved the utility files associated with Basic tests to the new directory security_solution_api_integration. Files not actively used in the previous folder were moved, while duplicate files remained in their original positions.

  • Updated the below files imports from the old lists_api_integration folder to the new lists_and_exception_lists

      lists_api_integration/  
        - exceptions/operators_data_types/date_numeric_types/date.ts
        - exceptions/operators_data_types/date_numeric_types/double.ts
        - exceptions/operators_data_types/date_numeric_types/float.ts 
        - exceptions/operators_data_types/date_numeric_types/integer.ts
        - exceptions/operators_data_types/ips/ip.ts
        - exceptions/operators_data_types/ips/ip_array.ts
        - exceptions/operators_data_types/keyword/keyword.ts
        - exceptions/operators_data_types/keyword/keyword_array.ts
        - exceptions/operators_data_types/long/long.ts
        - exceptions/operators_data_types/text/text.ts
        - exceptions/operators_data_types/text/text_array.ts
        - exceptions/workflows/create_endpoint_exceptions.ts
        - exceptions/workflows/create_rule_exceptions.ts
        - exceptions/workflows/find_rule_exception_references.ts
        - exceptions/workflows/role_based_add_edit_comments.ts
        - exceptions/workflows/role_based_rule_exceptions_workflows.ts
        - exceptions/workflows/rule_exception_synchronizations.ts
        - rule_execution_logic/execution_logic/esql.ts
        - rule_execution_logic/execution_logic/machine_learning.ts
        - rule_execution_logic/execution_logic/new_terms.ts
        - rule_execution_logic/execution_logic/query.ts
        - telemetry/task_based/all_types.ts
        - telemetry/task_based/detection_rules.ts
        - telemetry/task_based/security_lists.ts
    
        These files should be moved too soon to the new `lists_api_integration`
       detection_engine_api_integration/security_and_spaces/group10
           - import_export_rules.ts 
           - import_rules.ts
           - perform_bulk_actions   
    
  • Updated the below files imports to the ftr_provider_context_with_spaces.d.ts
    - risk_engine/risk_scoring_task/task_execution_nondefault_spaces.ts

  • The QA phase concluded with all tests passing successfully. 🟢

  • Updated the CodeOwner file for the newly moved tests

  • Add a new util file to deleteAllExceptions under the old detection_engine_api folder since the Rule management related-tests are still need to be moved over to the new folder

  • Old/new group details, decisions, and execution time are mentioned in this document

@WafaaNasr WafaaNasr added release_note:skip Skip the PR/issue when compiling release notes test-api-integration FTR labels Nov 27, 2023
@WafaaNasr WafaaNasr self-assigned this Nov 27, 2023
@WafaaNasr WafaaNasr marked this pull request as ready for review November 28, 2023 09:44
@WafaaNasr WafaaNasr requested review from a team as code owners November 28, 2023 09:44
Copy link
Contributor

@pjhampton pjhampton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from SDA perspective ✅

Copy link
Contributor

@nkhristinin nkhristinin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review all code-owners file, I assume for EA and DE.

LGTM, thank you very much!

Copy link
Member

@mistic mistic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm on the ops side

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @WafaaNasr

@WafaaNasr WafaaNasr merged commit a4ed14b into elastic:main Nov 28, 2023
31 checks passed
@WafaaNasr WafaaNasr deleted the move-structure-list-apis branch November 28, 2023 15:40
@kibanamachine kibanamachine added v8.12.0 backport:skip This commit does not require backporting labels Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting FTR release_note:skip Skip the PR/issue when compiling release notes test-api-integration v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants