-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[SecuritySolution][Endpoint] Update Responder command definition test so that it fails when new commands are added #187491
[SecuritySolution][Endpoint] Update Responder command definition test so that it fails when new commands are added #187491
Conversation
/ci |
29445aa
to
20d5f90
Compare
20d5f90
to
81ff637
Compare
Pinging @elastic/security-defend-workflows (Team:Defend Workflows) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @ashokaditya,
could you explain how the test would fail when new commands are added? when a new command is added, isn't it added to the UI and also to CONSOLE_RESPONSE_ACTION_COMMANDS
the same time, so the test won't fail? or am i wrong here?
(i'm not really familiar with response actions, but i'd like to understand before approving :) )
No worries. Thanks for asking. So we add response console commands within console_commands_definition.ts. You can see the list of commands is a As a test, on your yarn test:jest_integration --config x-pack/plugins/security_solution/jest.integration.config.js x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/integration_tests/console_commands_definition.test.tsx You would notice that the tests pass, which should not be the case. Note: I updated the test again as when I ran the test myself as above the test was not failing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @ashokaditya for the explanation! 🚀
… so that it fails when new commands are added (elastic#187491) ## Summary Updates test so that it fails whenever we add a introduce a new responder command. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed (cherry picked from commit fffc684)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…on test so that it fails when new commands are added (#187491) (#187689) # Backport This will backport the following commits from `main` to `8.15`: - [[SecuritySolution][Endpoint] Update Responder command definition test so that it fails when new commands are added (#187491)](#187491) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ash","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-05T14:51:39Z","message":"[SecuritySolution][Endpoint] Update Responder command definition test so that it fails when new commands are added (#187491)\n\n## Summary\r\n\r\nUpdates test so that it fails whenever we add a introduce a new\r\nresponder command.\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed","sha":"fffc684d4e489490ede9726ffe0792206a14be34","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Defend Workflows","OLM Sprint","v8.15.0","v8.16.0"],"title":"[SecuritySolution][Endpoint] Update Responder command definition test so that it fails when new commands are added","number":187491,"url":"https://github.com/elastic/kibana/pull/187491","mergeCommit":{"message":"[SecuritySolution][Endpoint] Update Responder command definition test so that it fails when new commands are added (#187491)\n\n## Summary\r\n\r\nUpdates test so that it fails whenever we add a introduce a new\r\nresponder command.\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed","sha":"fffc684d4e489490ede9726ffe0792206a14be34"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/187491","number":187491,"mergeCommit":{"message":"[SecuritySolution][Endpoint] Update Responder command definition test so that it fails when new commands are added (#187491)\n\n## Summary\r\n\r\nUpdates test so that it fails whenever we add a introduce a new\r\nresponder command.\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed","sha":"fffc684d4e489490ede9726ffe0792206a14be34"}}]}] BACKPORT--> Co-authored-by: Ash <[email protected]>
Summary
Updates test so that it fails whenever we add a introduce a new responder command.
Checklist