diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/alert_tags.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/alert_tags.cy.ts index 39758e5a097c8..52a6afc2e4f25 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/alert_tags.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/alert_tags.cy.ts @@ -33,7 +33,7 @@ describe('Alert tagging', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { login(); deleteAlertsAndRules(); - cy.task('esArchiverLoad', 'endpoint'); + cy.task('esArchiverLoad', { archiveName: 'endpoint' }); createRule(getNewRule({ rule_id: 'new custom rule' })); visit(ALERTS_URL); waitForAlertsToPopulate(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/cti_enrichments.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/cti_enrichments.cy.ts index 27921bb9b2d70..ebf5f97bbc790 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/cti_enrichments.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/cti_enrichments.cy.ts @@ -31,8 +31,8 @@ import { addsFieldsToTimeline } from '../../tasks/rule_details'; describe('CTI Enrichment', { tags: ['@ess', '@serverless'] }, () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'threat_indicator'); - cy.task('esArchiverLoad', 'suspicious_source_event'); + cy.task('esArchiverLoad', { archiveName: 'threat_indicator' }); + cy.task('esArchiverLoad', { archiveName: 'suspicious_source_event' }); login(); createRule({ ...getNewThreatIndicatorRule(), rule_id: 'rule_testing', enabled: true }); disableExpandableFlyout(); @@ -155,7 +155,7 @@ describe('CTI Enrichment', { tags: ['@ess', '@serverless'] }, () => { describe('with additional indicators', () => { before(() => { - cy.task('esArchiverLoad', 'threat_indicator2'); + cy.task('esArchiverLoad', { archiveName: 'threat_indicator2' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/enrichments.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/enrichments.cy.ts index 3cf0665795cf6..d427a7e3d43a4 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/enrichments.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/enrichments.cy.ts @@ -33,7 +33,7 @@ import { ALERTS_URL } from '../../urls/navigation'; describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'risk_users'); + cy.task('esArchiverLoad', { archiveName: 'risk_users' }); }); after(() => { @@ -43,7 +43,7 @@ describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { describe('Custom query rule', () => { beforeEach(() => { disableExpandableFlyout(); - cy.task('esArchiverLoad', 'risk_hosts'); + cy.task('esArchiverLoad', { archiveName: 'risk_hosts' }); deleteAlertsAndRules(); createRule(getNewRule({ rule_id: 'rule1' })); login(); @@ -75,7 +75,7 @@ describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { closeAlertFlyout(); cy.task('esArchiverUnload', 'risk_hosts'); - cy.task('esArchiverLoad', 'risk_hosts_updated'); + cy.task('esArchiverLoad', { archiveName: 'risk_hosts_updated' }); expandFirstAlert(); cy.get(ENRICHED_DATA_ROW).contains('Critical'); cy.get(ENRICHED_DATA_ROW).contains('Original host risk classification'); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/ransomware_detection.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/ransomware_detection.cy.ts index 93e0ce8ba8f4e..236a23da8e71d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/ransomware_detection.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/ransomware_detection.cy.ts @@ -16,7 +16,9 @@ import { createTimeline } from '../../tasks/timelines'; describe('Ransomware Detection Alerts', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cy.task('esArchiverLoad', 'ransomware_detection'); + cy.task('esArchiverLoad', { + archiveName: 'ransomware_detection', + }); }); describe('Ransomware display in Alerts Section', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/ransomware_prevention.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/ransomware_prevention.cy.ts index 4f6379b3a6bd9..ea80743898686 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/ransomware_prevention.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_alerts/ransomware_prevention.cy.ts @@ -13,10 +13,14 @@ import { ALERTS_HISTOGRAM_SERIES, ALERT_RULE_NAME, MESSAGE } from '../../screens import { TIMELINE_QUERY, TIMELINE_VIEW_IN_ANALYZER } from '../../screens/timeline'; import { selectAlertsHistogram } from '../../tasks/alerts'; import { createTimeline } from '../../tasks/timelines'; +import { cleanKibana } from '../../tasks/common'; describe('Ransomware Prevention Alerts', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cy.task('esArchiverLoad', 'ransomware_prevention'); + cleanKibana(); + cy.task('esArchiverLoad', { + archiveName: 'ransomware_prevention', + }); }); after(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/event_correlation_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/event_correlation_rule.cy.ts index 73e501009656a..a767fe7b533e2 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/event_correlation_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/event_correlation_rule.cy.ts @@ -151,7 +151,7 @@ describe('EQL rules', { tags: ['@ess', '@brokenInServerless'] }, () => { const rule = getEqlSequenceRule(); beforeEach(() => { - cy.task('esArchiverLoad', 'auditbeat_big'); + cy.task('esArchiverLoad', { archiveName: 'auditbeat_big' }); }); afterEach(() => { cy.task('esArchiverUnload', 'auditbeat_big'); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/indicator_match_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/indicator_match_rule.cy.ts index b78d67d58980a..6174d07e8ad5d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/indicator_match_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/indicator_match_rule.cy.ts @@ -120,8 +120,8 @@ describe('indicator match', { tags: ['@ess', '@brokenInServerless'] }, () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'threat_indicator'); - cy.task('esArchiverLoad', 'suspicious_source_event'); + cy.task('esArchiverLoad', { archiveName: 'threat_indicator' }); + cy.task('esArchiverLoad', { archiveName: 'suspicious_source_event' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts index ae83f8b769b17..36bc18210863f 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts @@ -50,7 +50,7 @@ describe( () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'all_users'); + cy.task('esArchiverLoad', { archiveName: 'all_users' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/alerts_table_flow/endpoint_exceptions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/alerts_table_flow/endpoint_exceptions.cy.ts index 05dfb695956b5..920ddd62909b3 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/alerts_table_flow/endpoint_exceptions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/alerts_table_flow/endpoint_exceptions.cy.ts @@ -54,7 +54,7 @@ describe.skip( cy.task('esArchiverResetKibana'); login(); deleteAlertsAndRules(); - cy.task('esArchiverLoad', 'endpoint'); + cy.task('esArchiverLoad', { archiveName: 'endpoint' }); createRule(getEndpointRule()); visitWithoutDateRange(DETECTIONS_RULE_MANAGEMENT_URL); goToRuleDetails(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/alerts_table_flow/rule_exceptions/auto_populate_with_alert_data.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/alerts_table_flow/rule_exceptions/auto_populate_with_alert_data.cy.ts index 82cfc48100402..14d002b96b7b4 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/alerts_table_flow/rule_exceptions/auto_populate_with_alert_data.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/alerts_table_flow/rule_exceptions/auto_populate_with_alert_data.cy.ts @@ -50,7 +50,7 @@ describe.skip( beforeEach(() => { cy.task('esArchiverUnload', 'endpoint'); cy.task('esArchiverResetKibana'); - cy.task('esArchiverLoad', 'endpoint'); + cy.task('esArchiverLoad', { archiveName: 'endpoint' }); login(); createRule(getEndpointRule()); visitWithoutDateRange(DETECTIONS_RULE_MANAGEMENT_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/alerts_table_flow/rule_exceptions/closing_all_matching_alerts.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/alerts_table_flow/rule_exceptions/closing_all_matching_alerts.cy.ts index ea905a7774126..9c4a575dccb4e 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/alerts_table_flow/rule_exceptions/closing_all_matching_alerts.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/alerts_table_flow/rule_exceptions/closing_all_matching_alerts.cy.ts @@ -36,7 +36,7 @@ describe('Close matching Alerts ', () => { cy.task('esArchiverUnload', 'exceptions'); cy.task('esArchiverResetKibana'); deleteAlertsAndRules(); - cy.task('esArchiverLoad', 'exceptions'); + cy.task('esArchiverLoad', { archiveName: 'exceptions' }); login(); postDataView('exceptions-*'); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/entry/flyout_validation.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/entry/flyout_validation.cy.ts index 078f743e1cea7..e11cace87d8e8 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/entry/flyout_validation.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/entry/flyout_validation.cy.ts @@ -71,10 +71,10 @@ describe.skip('Exceptions flyout', { tags: ['@ess', '@serverless'] }, () => { // this is a made-up index that has just the necessary // mappings to conduct tests, avoiding loading large // amounts of data like in auditbeat_exceptions - cy.task('esArchiverLoad', 'exceptions'); + cy.task('esArchiverLoad', { archiveName: 'exceptions' }); // Comment the Conflicts here as they are skipped - // cy.task('esArchiverLoad', 'conflicts_1'); - // cy.task('esArchiverLoad', 'conflicts_2'); + // cy.task('esArchiverLoad',{ archiveName: 'conflicts_1' }); + // cy.task('esArchiverLoad',{ archiveName: 'conflicts_2' }); login(); createExceptionList(getExceptionList(), getExceptionList().list_id).then((response) => createRule( diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/entry/use_value_list.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/entry/use_value_list.cy.ts index 51f0e954f63ce..e45484e5fb834 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/entry/use_value_list.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/entry/use_value_list.cy.ts @@ -54,7 +54,7 @@ describe('Use Value list in exception entry', { tags: ['@ess', '@serverless'] }, before(() => { cleanKibana(); login(); - cy.task('esArchiverLoad', 'exceptions'); + cy.task('esArchiverLoad', { archiveName: 'exceptions' }); createRule({ ...getNewRule(), query: 'user.name:*', diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts index 47f6717fa3143..cdf0b56347063 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts @@ -49,7 +49,7 @@ describe('Add endpoint exception from rule details', { tags: ['@ess', '@serverle before(() => { cy.task('esArchiverResetKibana'); - cy.task('esArchiverLoad', 'auditbeat'); + cy.task('esArchiverLoad', { archiveName: 'auditbeat' }); login(); deleteAlertsAndRules(); // create rule with exception diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_exception.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_exception.cy.ts index 6a51085df468b..18537145ec582 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_exception.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_exception.cy.ts @@ -66,7 +66,7 @@ describe('Add/edit exception from rule details', { tags: ['@ess', '@brokenInServ before(() => { cy.task('esArchiverResetKibana'); - cy.task('esArchiverLoad', 'exceptions'); + cy.task('esArchiverLoad', { archiveName: 'exceptions' }); login(); }); @@ -319,7 +319,7 @@ describe('Add/edit exception from rule details', { tags: ['@ess', '@brokenInServ cy.get(NO_EXCEPTIONS_EXIST_PROMPT).should('exist'); // load more docs - cy.task('esArchiverLoad', 'exceptions_2'); + cy.task('esArchiverLoad', { archiveName: 'exceptions_2' }); // now that there are no more exceptions, the docs should match and populate alerts goToAlertsTab(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts index ada21eb844450..229cfce25b9fa 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts @@ -50,7 +50,7 @@ describe( before(() => { cy.task('esArchiverResetKibana'); - cy.task('esArchiverLoad', 'exceptions'); + cy.task('esArchiverLoad', { archiveName: 'exceptions' }); login(); postDataView('exceptions-*'); }); @@ -117,7 +117,7 @@ describe( cy.get(NO_EXCEPTIONS_EXIST_PROMPT).should('exist'); // load more docs - cy.task('esArchiverLoad', 'exceptions_2'); + cy.task('esArchiverLoad', { archiveName: 'exceptions_2' }); // now that there are no more exceptions, the docs should match and populate alerts goToAlertsTab(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts index 7f343b46a3467..5c9b93ed1507b 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts @@ -41,7 +41,7 @@ import { describe('Add, edit and delete exception', { tags: ['@ess', '@serverless'] }, () => { before(() => { cy.task('esArchiverResetKibana'); - cy.task('esArchiverLoad', 'exceptions'); + cy.task('esArchiverLoad', { archiveName: 'exceptions' }); createRule(getNewRule()); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts index cea38567dbf70..07c14cf9f5e8f 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts @@ -77,8 +77,8 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@brokenInServerless'] } describe('Risk Score enabled but still no data', () => { before(() => { - cy.task('esArchiverLoad', 'risk_hosts_no_data'); - cy.task('esArchiverLoad', 'risk_users_no_data'); + cy.task('esArchiverLoad', { archiveName: 'risk_hosts_no_data' }); + cy.task('esArchiverLoad', { archiveName: 'risk_users_no_data' }); }); beforeEach(() => { @@ -102,8 +102,8 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@brokenInServerless'] } describe('With Legacy data', () => { before(() => { - cy.task('esArchiverLoad', 'risk_hosts_legacy_data'); - cy.task('esArchiverLoad', 'risk_users_legacy_data'); + cy.task('esArchiverLoad', { archiveName: 'risk_hosts_legacy_data' }); + cy.task('esArchiverLoad', { archiveName: 'risk_users_legacy_data' }); }); beforeEach(() => { @@ -127,7 +127,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@brokenInServerless'] } describe('With host risk data', () => { before(() => { - cy.task('esArchiverLoad', 'risk_hosts'); + cy.task('esArchiverLoad', { archiveName: 'risk_hosts' }); }); beforeEach(() => { @@ -215,7 +215,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@brokenInServerless'] } describe('With user risk data', () => { before(() => { - cy.task('esArchiverLoad', 'risk_users'); + cy.task('esArchiverLoad', { archiveName: 'risk_users' }); }); beforeEach(() => { @@ -304,7 +304,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@brokenInServerless'] } describe('With anomalies data', () => { before(() => { - cy.task('esArchiverLoad', 'network'); + cy.task('esArchiverLoad', { archiveName: 'network' }); login(); visit(ENTITY_ANALYTICS_URL); cy.get(ANOMALIES_TABLE).should('be.visible'); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/host_details/risk_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/host_details/risk_tab.cy.ts index cdfd01c034c33..aed7de2110ba6 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/host_details/risk_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/host_details/risk_tab.cy.ts @@ -13,7 +13,7 @@ import { TABLE_CELL, TABLE_ROWS } from '../../../screens/alerts_details'; describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'risk_hosts'); + cy.task('esArchiverLoad', { archiveName: 'risk_hosts' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts index 95976d90f9557..d8115e40cbb20 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts @@ -47,7 +47,7 @@ const defaultHeadersInDefaultEcsCategory = [ describe('Events Viewer', { tags: ['@ess', '@brokenInServerless'] }, () => { before(() => { - cy.task('esArchiverLoad', 'auditbeat_big'); + cy.task('esArchiverLoad', { archiveName: 'auditbeat_big' }); }); after(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/host_risk_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/host_risk_tab.cy.ts index ce59d0de0b9ad..1a64f741ebeff 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/host_risk_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/host_risk_tab.cy.ts @@ -24,7 +24,7 @@ import { clearSearchBar, kqlSearch } from '../../../tasks/security_header'; describe('risk tab', { tags: ['@ess', '@brokenInServerless'] }, () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'risk_hosts'); + cy.task('esArchiverLoad', { archiveName: 'risk_hosts' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/hosts_risk_column.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/hosts_risk_column.cy.ts index 664e5767dc2b9..77593f429b1d4 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/hosts_risk_column.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/hosts_risk_column.cy.ts @@ -15,7 +15,7 @@ import { kqlSearch } from '../../../tasks/security_header'; describe('All hosts table', { tags: ['@ess', '@serverless'] }, () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'risk_hosts'); + cy.task('esArchiverLoad', { archiveName: 'risk_hosts' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/hover_actions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/hover_actions.cy.ts index 036fd908a8f0d..4f634ebc3ce2f 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/hover_actions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/hover_actions.cy.ts @@ -32,7 +32,7 @@ describe.skip('Hover actions', { tags: ['@ess', '@serverless'] }, () => { }; before(() => { - cy.task('esArchiverLoad', 'network'); + cy.task('esArchiverLoad', { archiveName: 'network' }); }); after(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/overflow_items.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/overflow_items.cy.ts index 71bdd66b9b381..9ac413d75a6d2 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/overflow_items.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/overflow_items.cy.ts @@ -25,7 +25,7 @@ const testDomainTwo = 'myTest2'; describe('Overflow items', { tags: ['@ess', '@serverless'] }, () => { context('Network stats and tables', () => { before(() => { - cy.task('esArchiverLoad', 'network'); + cy.task('esArchiverLoad', { archiveName: 'network' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts index eec86830718a7..514569c2c1667 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts @@ -19,7 +19,7 @@ import { getTimeline } from '../../../objects/timeline'; describe('Overview Page', { tags: ['@ess', '@serverless'] }, () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'overview'); + cy.task('esArchiverLoad', { archiveName: 'overview' }); }); beforeEach(() => { @@ -69,7 +69,7 @@ describe('Overview page with no data', { tags: '@brokenInServerless' }, () => { cy.task('esArchiverUnload', 'auditbeat'); }); after(() => { - cy.task('esArchiverLoad', 'auditbeat'); + cy.task('esArchiverLoad', { archiveName: 'auditbeat' }); }); it('Splash screen should be here', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/pagination/pagination.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/pagination/pagination.cy.ts index 3f9b31b819c42..1e7f7d7514404 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/pagination/pagination.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/pagination/pagination.cy.ts @@ -23,7 +23,7 @@ import { goToTablePage, sortFirstTableColumn } from '../../../tasks/table_pagina describe('Pagination', { tags: ['@ess', '@serverless'] }, () => { describe('Host uncommon processes table)', () => { before(() => { - cy.task('esArchiverLoad', 'host_uncommon_processes'); + cy.task('esArchiverLoad', { archiveName: 'host_uncommon_processes' }); }); beforeEach(() => { @@ -99,7 +99,7 @@ describe('Pagination', { tags: ['@ess', '@serverless'] }, () => { describe('All users and all Hosts tables', () => { before(() => { - cy.task('esArchiverLoad', 'all_users'); + cy.task('esArchiverLoad', { archiveName: 'all_users' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts index 34401c1743cd9..5b655be068ea9 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts @@ -22,9 +22,9 @@ import { USERS_URL } from '../../../urls/navigation'; describe('Users stats and tables', () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'users'); + cy.task('esArchiverLoad', { archiveName: 'users' }); - cy.task('esArchiverLoad', 'risk_users'); + cy.task('esArchiverLoad', { archiveName: 'risk_users' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/inspect/inspect_button.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/inspect/inspect_button.cy.ts index 209422bcf7eb7..fd9fc56c95fc4 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/inspect/inspect_button.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/inspect/inspect_button.cy.ts @@ -24,8 +24,8 @@ const DATA_VIEW = 'auditbeat-*'; describe('Inspect Explore pages', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cy.task('esArchiverLoad', 'risk_users'); - cy.task('esArchiverLoad', 'risk_hosts'); + cy.task('esArchiverLoad', { archiveName: 'risk_users' }); + cy.task('esArchiverLoad', { archiveName: 'risk_hosts' }); login(); // Create and select data view diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts index a8acec0019db6..975fdb3ee1d59 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts @@ -18,7 +18,9 @@ import { ALERTS_URL } from '../../../urls/navigation'; describe('Alerts Table Action column', { tags: ['@ess', '@serverless'] }, () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'process_ancestry'); + cy.task('esArchiverLoad', { + archiveName: 'process_ancestry', + }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts index d4ecaf16df975..470c8494386e1 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts @@ -60,7 +60,7 @@ describe('Alert details flyout', { tags: ['@ess', '@serverless'] }, () => { describe('With unmapped fields', () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'unmapped_fields'); + cy.task('esArchiverLoad', { archiveName: 'unmapped_fields' }); createRule(getUnmappedRule()); }); @@ -126,7 +126,7 @@ describe('Alert details flyout', { tags: ['@ess', '@serverless'] }, () => { describe('Url state management', () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'query_alert'); + cy.task('esArchiverLoad', { archiveName: 'query_alert' }); }); beforeEach(() => { @@ -172,7 +172,7 @@ describe('Alert details flyout', { tags: ['@ess', '@serverless'] }, () => { describe('Localstorage management', () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'query_alert'); + cy.task('esArchiverLoad', { archiveName: 'query_alert' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts index 6d3dc872e9c3c..0ed530adad451 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts @@ -27,7 +27,7 @@ describe( { tags: ['@ess', '@brokenInServerless'] }, () => { before(() => { - cy.task('esArchiverLoad', 'auditbeat_big'); + cy.task('esArchiverLoad', { archiveName: 'auditbeat_big' }); cleanKibana(); login(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts index 6eb08bb5930a0..d7aa5040072cc 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts @@ -40,7 +40,7 @@ import { ALERTS_URL } from '../../../urls/navigation'; describe('Changing alert status', { tags: ['@ess', '@brokenInServerless'] }, () => { before(() => { - cy.task('esArchiverLoad', 'auditbeat_big'); + cy.task('esArchiverLoad', { archiveName: 'auditbeat_big' }); cleanKibana(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts index 3470c21aa0ed3..3ba223097023a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts @@ -25,7 +25,7 @@ import { ALERTS_URL, HOSTS_URL } from '../../../urls/navigation'; describe('Bulk Investigate in Timeline', { tags: ['@ess', '@serverless'] }, () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'bulk_process'); + cy.task('esArchiverLoad', { archiveName: 'bulk_process' }); login(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts index a92956be8e134..a8ab36c7bd837 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts @@ -26,7 +26,7 @@ const defaultPageSize = 25; describe('Pagination', { tags: ['@ess', '@serverless'] }, () => { before(() => { cleanKibana(); - cy.task('esArchiverLoad', 'timeline'); + cy.task('esArchiverLoad', { archiveName: 'timeline' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/overview/cti_link_panel.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/overview/cti_link_panel.cy.ts index fd41df836216d..eb6548a5e5834 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/overview/cti_link_panel.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/overview/cti_link_panel.cy.ts @@ -32,7 +32,7 @@ describe('CTI Link Panel', { tags: ['@ess', '@serverless'] }, () => { describe('enabled threat intel module', () => { before(() => { - cy.task('esArchiverLoad', 'threat_indicator'); + cy.task('esArchiverLoad', { archiveName: 'threat_indicator' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts b/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts index 42ddb4a526387..bf2277c95e289 100644 --- a/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts +++ b/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts @@ -34,7 +34,8 @@ export const esArchiver = ( }); on('task', { - esArchiverLoad: async (archiveName) => esArchiverInstance.load(archiveName), + esArchiverLoad: async ({ archiveName, ...options }) => + esArchiverInstance.load(archiveName, options), esArchiverUnload: async (archiveName) => esArchiverInstance.unload(archiveName), esArchiverResetKibana: async () => esArchiverInstance.emptyKibanaIndex(), });