Skip to content

Commit

Permalink
[Security Solution] remove old and skipped Threat Intelligence Cypres…
Browse files Browse the repository at this point in the history
…s tests (#191166)
  • Loading branch information
PhilippeOberti authored Sep 12, 2024
1 parent c492036 commit 8377275
Show file tree
Hide file tree
Showing 54 changed files with 21 additions and 6,491 deletions.
2 changes: 0 additions & 2 deletions .buildkite/ftr_security_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ disabled:
- x-pack/test/osquery_cypress/visual_config.ts
- x-pack/test/security_solution_cypress/cli_config.ts
- x-pack/test/security_solution_cypress/config.ts
- x-pack/test/threat_intelligence_cypress/cli_config_parallel.ts
- x-pack/test/threat_intelligence_cypress/config.ts

# Playwright
- x-pack/test/security_solution_playwright/playwright.config.ts
Expand Down
18 changes: 0 additions & 18 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -386,24 +386,6 @@ steps:
- exit_status: '-1'
limit: 1

- command: .buildkite/scripts/steps/functional/threat_intelligence.sh
label: 'Threat Intelligence Cypress Tests'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-4
preemptible: true
depends_on:
- build
- quick_checks
timeout_in_minutes: 60
parallelism: 1
retry:
automatic:
- exit_status: '-1'
limit: 1

- command: .buildkite/scripts/steps/functional/osquery_cypress.sh
label: 'Osquery Cypress Tests'
agents:
Expand Down
17 changes: 0 additions & 17 deletions .buildkite/pipelines/pointer_compression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,23 +321,6 @@ steps:
- exit_status: '-1'
limit: 1

- command: .buildkite/scripts/steps/functional/threat_intelligence.sh
label: 'Threat Intelligence Cypress Tests'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-4
preemptible: true
depends_on:
- build
timeout_in_minutes: 60
parallelism: 1
retry:
automatic:
- exit_status: '-1'
limit: 1

- command: .buildkite/scripts/steps/functional/osquery_cypress.sh
label: 'Osquery Cypress Tests'
agents:
Expand Down

This file was deleted.

52 changes: 17 additions & 35 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,22 +245,35 @@ const getPipeline = (filename: string, removeSteps = true) => {
if (
(await doAnyChangesMatch([
/^package.json/,
/^packages\/kbn-doc-links/,
/^packages\/kbn-es-query/,
/^packages\/kbn-i18n-react/,
/^packages\/kbn-i18n/,
/^packages\/kbn-expandable-flyout/,
/^packages\/kbn-securitysolution-.*/,
/^packages\/kbn-securitysolution-io-ts-list-types/,
/^packages\/shared-ux/,
/^src\/core/,
/^src\/plugins\/data/,
/^src\/plugins\/kibana_utils/,
/^src\/plugins\/inspector/,
/^x-pack\/packages\/kbn-elastic-assistant/,
/^x-pack\/packages\/kbn-elastic-assistant-common/,
/^x-pack\/packages\/security-solution/,
/^x-pack\/plugins\/alerting/,
/^x-pack\/plugins\/cases/,
/^x-pack\/plugins\/data_views\/common/,
/^x-pack\/plugins\/elastic_assistant/,
/^x-pack\/plugins\/lists/,
/^x-pack\/plugins\/rule_registry\/common/,
/^x-pack\/plugins\/security_solution/,
/^x-pack\/plugins\/security_solution_ess/,
/^x-pack\/plugins\/security_solution_serverless/,
/^x-pack\/plugins\/task_manager/,
/^x-pack\/plugins\/threat_intelligence/,
/^x-pack\/plugins\/timelines/,
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/sections\/alerts_table/,
/^x-pack\/plugins\/usage_collection\/public/,
/^x-pack\/plugins\/elastic_assistant/,
/^x-pack\/packages\/security-solution/,
/^x-pack\/packages\/kbn-elastic-assistant/,
/^x-pack\/packages\/kbn-elastic-assistant-common/,
/^x-pack\/test\/functional\/es_archives\/security_solution/,
/^x-pack\/test\/security_solution_cypress/,
])) ||
Expand All @@ -271,37 +284,6 @@ const getPipeline = (filename: string, removeSteps = true) => {
);
}

if (
(await doAnyChangesMatch([
/^package.json/,
/^src\/plugins\/data/,
/^src\/plugins\/kibana_utils/,
/^src\/plugins\/inspector/,
/^src\/plugins\/data_views/,
/^src\/core/,
/^packages\/kbn-securitysolution-.*/,
/^packages\/kbn-es-query/,
/^packages\/kbn-securitysolution-io-ts-list-types/,
/^packages\/kbn-i18n-react/,
/^packages\/kbn-i18n/,
/^packages\/shared-ux/,
/^packages\/kbn-doc-links/,
/^packages\/kbn-securitysolution-io-ts-list-types/,
/^x-pack\/plugins\/threat_intelligence/,
/^x-pack\/packages\/security-solution/,
/^x-pack\/test\/threat_intelligence_cypress/,
/^x-pack\/plugins\/cases/,
/^x-pack\/plugins\/timelines/,
/^x-pack\/plugins\/triggers_actions_ui/,
/^x-pack\/plugins\/rule_registry/,
])) ||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
) {
pipeline.push(
getPipeline('.buildkite/pipelines/pull_request/security_solution/threat_intelligence.yml')
);
}

if (
((await doAnyChangesMatch([
/^x-pack\/plugins\/osquery/,
Expand Down
14 changes: 0 additions & 14 deletions .buildkite/scripts/steps/functional/threat_intelligence.sh

This file was deleted.

1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,6 @@ x-pack/test/security_solution_api_integration/test_suites/sources @elastic/secur

/x-pack/test/security_solution_cypress/cypress/e2e/investigations @elastic/security-threat-hunting-investigations
/x-pack/test/security_solution_cypress/cypress/e2e/sourcerer/sourcerer_timeline.cy.ts @elastic/security-threat-hunting-investigations
/x-pack/test/threat_intelligence_cypress @elastic/security-threat-hunting-investigations

x-pack/test/security_solution_cypress/cypress/screens/expandable_flyout @elastic/security-threat-hunting-investigations
x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/security-threat-hunting-investigations
Expand Down
2 changes: 0 additions & 2 deletions packages/kbn-ts-projects/ts_projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,5 @@ export const TS_PROJECTS = TsProject.loadAll({
// are present or up-to-date, and users likely won't know how to manage either, so the
// type check is explicitly disabled in this project for now
'.buildkite/tsconfig.json',

'x-pack/plugins/threat_intelligence/cypress/tsconfig.json',
],
});
6 changes: 1 addition & 5 deletions x-pack/plugins/threat_intelligence/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,5 @@ If changes are made to how developers build, test, interact with, or release cod

**E2E tests:**

```
node scripts/build_kibana_platform_plugins
cd x-pack/plugins/threat_intelligence
yarn cypress:open-as-ci
```
Cypress tests are integrated with the Security Solution ones. Please refer to https://github.com/elastic/kibana/blob/main/x-pack/test/security_solution_cypress/cypress/README.md for more information

19 changes: 1 addition & 18 deletions x-pack/plugins/threat_intelligence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,9 @@ see the file in order to adjust the amount of indicators generated. The default

## E2E

### Data fixtures and loading process

Use es_archives to export data for e2e testing purposes, like so:

```
TEST_ES_PORT=9200 node scripts/es_archiver save x-pack/test/threat_intelligence_cypress/es_archives/threat_intelligence "logs-ti*"
```

These can be loaded at will with `x-pack/plugins/threat_intelligence/cypress/tasks/es_archiver.ts` task.

You can use this approach to load separate data dumps for every test case, to cover all critical scenarios.

### Running locally

`cd` into plugin root and execute `yarn cypress:open-as-ci`

### CI Execution

The entry point for PR testing is `.buildkite/pipelines/pull_request/base.yml` file, see that for details on
how the test suite is executed & extra options regarding parallelism, retrying etc.
Cypress tests are integrated with the Security Solution ones. Please refer to https://github.com/elastic/kibana/blob/main/x-pack/test/security_solution_cypress/cypress/README.md for more information

## FAQ

Expand Down
13 changes: 0 additions & 13 deletions x-pack/plugins/threat_intelligence/cypress/.eslintrc.json

This file was deleted.

56 changes: 0 additions & 56 deletions x-pack/plugins/threat_intelligence/cypress/cypress.config.ts

This file was deleted.

106 changes: 0 additions & 106 deletions x-pack/plugins/threat_intelligence/cypress/e2e/block_list.cy.ts

This file was deleted.

Loading

0 comments on commit 8377275

Please sign in to comment.