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

[Defend Workflows][E2E]Endpoint e2e response console multipass #155519

Merged

Conversation

szwarckonrad
Copy link
Contributor

@szwarckonrad szwarckonrad commented Apr 21, 2023

This PR adds e2e test run on real endpoint for coverage of isolate, processes, kill-process and suspend-process commands from respond console.

Depends on #155360

# Conflicts:
#	x-pack/plugins/security_solution/common/endpoint/index_data.ts
# Conflicts:
#	x-pack/plugins/security_solution/public/management/cypress/support/data_loaders.ts
#	x-pack/plugins/security_solution/public/management/cypress/support/plugin_handlers/endpoint_data_loader.ts
#	x-pack/plugins/security_solution/public/management/cypress/tasks/index_endpoint_hosts.ts
#	x-pack/plugins/security_solution/scripts/endpoint/agent_emulator/services/endpoint_response_actions.ts
# Conflicts:
#	x-pack/test/security_solution_endpoint/apps/endpoint/endpoint_list.ts
@szwarckonrad szwarckonrad requested review from a team as code owners April 21, 2023 14:28
@szwarckonrad szwarckonrad added the release_note:skip Skip the PR/issue when compiling release notes label Apr 21, 2023
@szwarckonrad szwarckonrad marked this pull request as ready for review April 24, 2023 14:56
@szwarckonrad szwarckonrad marked this pull request as draft April 24, 2023 15:04
@szwarckonrad szwarckonrad changed the title [Defend Workflows][E2E]Endpoint e2e response console coverage in multipass [Defend Workflows][E2E]Endpoint e2e response console multipass Apr 25, 2023
@szwarckonrad szwarckonrad marked this pull request as ready for review April 25, 2023 15:00
Copy link
Contributor

@gergoabraham gergoabraham left a comment

Choose a reason for hiding this comment

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

great! 🚢

also, checked it out to have it running on a different computer since it's not yet on CI, and passed smoothly 🚀

const policyName = `Reassign ${Math.random().toString(36).substring(2, 7)}`;

cy.task<IndexedFleetEndpointPolicyResponse>('indexFleetEndpointPolicy', {
return cy.task<IndexedFleetEndpointPolicyResponse>('indexFleetEndpointPolicy', {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Security Solution Tests #3 / timeline flyout button the (+) button popover menu owns focus

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 17 19 +2
securitySolution 399 402 +3
total +5

Total ESLint disabled count

id before after diff
enterpriseSearch 18 20 +2
securitySolution 479 482 +3
total +5

History

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

@szwarckonrad szwarckonrad merged commit d80fdd6 into elastic:main Apr 27, 2023
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 27, 2023
…ic#155519)

This PR adds e2e test run on real endpoint for coverage of isolate,
processes, kill-process and suspend-process commands from respond
console.

Depends on elastic#155360

(cherry picked from commit d80fdd6)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@patrykkopycinski patrykkopycinski deleted the endpoint-e2e-coverage-multipass branch April 30, 2023 10:34
@patrykkopycinski patrykkopycinski restored the endpoint-e2e-coverage-multipass branch April 30, 2023 10:34
patrykkopycinski added a commit that referenced this pull request May 2, 2023
Depends on #155519

E2E coverage of `isolate`, `processes`, `kill-process` and
`suspend-process` commands on mocked endpoint.

E2E coverage of the above but on real endpoint is
[here](#155519).

Because these tests are run against mocked data I've decided not to mock
`kill-process` and `suspend-process` outcome (whether process is
actually killed/suspended) because it would mean testing mocks
themselves. What is tested is the outcome the user sees ('Action
completed').

---------

Co-authored-by: Patryk Kopycinski <[email protected]>
kibanamachine added a commit that referenced this pull request May 2, 2023
…155519) (#155975)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Defend Workflows][E2E]Endpoint e2e response console multipass
(#155519)](#155519)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Konrad
Szwarc","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-04-27T08:27:21Z","message":"[Defend
Workflows][E2E]Endpoint e2e response console multipass (#155519)\n\nThis
PR adds e2e test run on real endpoint for coverage of
isolate,\r\nprocesses, kill-process and suspend-process commands from
respond\r\nconsole.\r\n\r\nDepends on
https://github.com/elastic/kibana/pull/155360","sha":"d80fdd6bceec438cae572ba13eae3ee3a9d3c5c3","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Defend
Workflows","v8.8.0","v8.9.0"],"number":155519,"url":"https://github.com/elastic/kibana/pull/155519","mergeCommit":{"message":"[Defend
Workflows][E2E]Endpoint e2e response console multipass (#155519)\n\nThis
PR adds e2e test run on real endpoint for coverage of
isolate,\r\nprocesses, kill-process and suspend-process commands from
respond\r\nconsole.\r\n\r\nDepends on
https://github.com/elastic/kibana/pull/155360","sha":"d80fdd6bceec438cae572ba13eae3ee3a9d3c5c3"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155519","number":155519,"mergeCommit":{"message":"[Defend
Workflows][E2E]Endpoint e2e response console multipass (#155519)\n\nThis
PR adds e2e test run on real endpoint for coverage of
isolate,\r\nprocesses, kill-process and suspend-process commands from
respond\r\nconsole.\r\n\r\nDepends on
https://github.com/elastic/kibana/pull/155360","sha":"d80fdd6bceec438cae572ba13eae3ee3a9d3c5c3"}}]}]
BACKPORT-->

Co-authored-by: Konrad Szwarc <[email protected]>
Co-authored-by: Patryk Kopyciński <[email protected]>
szwarckonrad added a commit to szwarckonrad/kibana that referenced this pull request May 26, 2023
Depends on elastic#155519

E2E coverage of `isolate`, `processes`, `kill-process` and
`suspend-process` commands on mocked endpoint.

E2E coverage of the above but on real endpoint is
[here](elastic#155519).

Because these tests are run against mocked data I've decided not to mock
`kill-process` and `suspend-process` outcome (whether process is
actually killed/suspended) because it would mean testing mocks
themselves. What is tested is the outcome the user sees ('Action
completed').

---------

Co-authored-by: Patryk Kopycinski <[email protected]>
(cherry picked from commit fd5309f)
szwarckonrad referenced this pull request May 26, 2023
…158553)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Defend Workflows][E2E]Endpoint e2e response console
(#155605)](#155605)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Konrad
Szwarc","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-05-02T09:02:06Z","message":"[Defend
Workflows][E2E]Endpoint e2e response console (#155605)\n\nDepends on
https://github.com/elastic/kibana/pull/155519\r\n\r\nE2E coverage of
`isolate`, `processes`, `kill-process` and\r\n`suspend-process` commands
on mocked endpoint.\r\n\r\nE2E coverage of the above but on real
endpoint
is\r\n[here](https://github.com/elastic/kibana/pull/155519).\r\n\r\nBecause
these tests are run against mocked data I've decided not to
mock\r\n`kill-process` and `suspend-process` outcome (whether process
is\r\nactually killed/suspended) because it would mean testing
mocks\r\nthemselves. What is tested is the outcome the user sees
('Action\r\ncompleted').\r\n\r\n---------\r\n\r\nCo-authored-by: Patryk
Kopycinski
<[email protected]>","sha":"fd5309f6a02bce641c4baf79500acfe797e294f7","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Defend
Workflows","v8.8.0","v8.9.0"],"number":155605,"url":"https://github.com/elastic/kibana/pull/155605","mergeCommit":{"message":"[Defend
Workflows][E2E]Endpoint e2e response console (#155605)\n\nDepends on
https://github.com/elastic/kibana/pull/155519\r\n\r\nE2E coverage of
`isolate`, `processes`, `kill-process` and\r\n`suspend-process` commands
on mocked endpoint.\r\n\r\nE2E coverage of the above but on real
endpoint
is\r\n[here](https://github.com/elastic/kibana/pull/155519).\r\n\r\nBecause
these tests are run against mocked data I've decided not to
mock\r\n`kill-process` and `suspend-process` outcome (whether process
is\r\nactually killed/suspended) because it would mean testing
mocks\r\nthemselves. What is tested is the outcome the user sees
('Action\r\ncompleted').\r\n\r\n---------\r\n\r\nCo-authored-by: Patryk
Kopycinski
<[email protected]>","sha":"fd5309f6a02bce641c4baf79500acfe797e294f7"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155605","number":155605,"mergeCommit":{"message":"[Defend
Workflows][E2E]Endpoint e2e response console (#155605)\n\nDepends on
https://github.com/elastic/kibana/pull/155519\r\n\r\nE2E coverage of
`isolate`, `processes`, `kill-process` and\r\n`suspend-process` commands
on mocked endpoint.\r\n\r\nE2E coverage of the above but on real
endpoint
is\r\n[here](https://github.com/elastic/kibana/pull/155519).\r\n\r\nBecause
these tests are run against mocked data I've decided not to
mock\r\n`kill-process` and `suspend-process` outcome (whether process
is\r\nactually killed/suspended) because it would mean testing
mocks\r\nthemselves. What is tested is the outcome the user sees
('Action\r\ncompleted').\r\n\r\n---------\r\n\r\nCo-authored-by: Patryk
Kopycinski
<[email protected]>","sha":"fd5309f6a02bce641c4baf79500acfe797e294f7"}}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants