forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution][API testing] Move and restructures rule preview t…
…est and actions legacy utils (elastic#170147) ## Summary - Following the initial work in this elastic#166755 - Addresses part of elastic#151902 for rule preview https://docs.google.com/document/d/1CRFfDWMzw3ob03euWIvT4-IoiLXjoiPWI8mTBqP4Zks/edit - Remove the `skipInQA` tag from `Migrations` actions test since it runs only in ESS env. ### Moved files from `detection_engine_api_integrations` to `security_solution_api_integration` - utils (Moved and references are updated): - './get_legacy_action_notifications_so_by_id'; - './get_legacy_actions_so_by_id'; - './get_simple_preview_rule'; - './get_simple_rule_output_with_web_hook_action'; - './get_simple_rule_preview_output'; - Group1: - `preview_rules` moved under the `rule_creation` folder
- Loading branch information
Showing
14 changed files
with
59 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
...est/detection_engine_api_integration/utils/get_simple_rule_output_with_web_hook_action.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
25 changes: 25 additions & 0 deletions
25
...tion/test_suites/detections_response/utils/actions/legacy_actions/get_legacy_action_so.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import type { Client } from '@elastic/elasticsearch'; | ||
import type { SearchResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; | ||
import { SECURITY_SOLUTION_SAVED_OBJECT_INDEX } from '@kbn/core-saved-objects-server'; | ||
import type { SavedObjectReference } from '@kbn/core/server'; | ||
import type { LegacyRuleActions } from '@kbn/security-solution-plugin/server/lib/detection_engine/rule_actions_legacy'; | ||
|
||
interface LegacyActionSO extends LegacyRuleActions { | ||
references: SavedObjectReference[]; | ||
} | ||
|
||
/** | ||
* Fetch all legacy action sidecar SOs from the security solution savedObjects index | ||
* @param es The ElasticSearch service | ||
*/ | ||
export const getLegacyActionSO = async (es: Client): Promise<SearchResponse<LegacyActionSO>> => | ||
es.search({ | ||
index: SECURITY_SOLUTION_SAVED_OBJECT_INDEX, | ||
q: 'type:siem-detection-engine-rule-actions', | ||
}); |
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
...ion_api_integration/test_suites/detections_response/utils/actions/legacy_actions/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
export * from './get_legacy_action_so'; | ||
export * from './get_legacy_actions_so_by_id'; | ||
export * from './get_legacy_action_notifications_so_by_id'; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters