-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Security Solution] Reduces noise in test by mocking additional QueryClient functions #175266
Merged
Conversation
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
spong
added
chore
release_note:skip
Skip the PR/issue when compiling release notes
backport:skip
This commit does not require backporting
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Feature:Security Assistant
Security Assistant
v8.13.0
labels
Jan 22, 2024
Pinging @elastic/security-solution (Team: SecuritySolution) |
stephmilovic
approved these changes
Jan 22, 2024
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.
Awesome, thanks for the cleanup!
💚 Build Succeeded
Metrics [docs]
To update your PR or re-run it, just comment with: cc @spong |
lcawl
pushed a commit
to lcawl/kibana
that referenced
this pull request
Jan 26, 2024
…yClient functions (elastic#175266) ## Summary After elastic#174317, some of our Security Solution tests got quite noisy with the following errors: <p align="center"> <img width="700" src="https://github.com/elastic/kibana/assets/2946766/c3a31a3e-e9f2-4b5b-97f7-097bee517d02" /> </p> This PR adds additional mocks to the SecuritySolution `QueryClient` to quiet the noise. Note, there was no underlying issue here, I had just missed adding these new mocks to the main SecuritySolution QueryClient (they were added to the [other one](https://github.com/elastic/kibana/pull/174317/files#diff-f6898b396527248e4f5b8fcb0a87d917e9787ca3956dbae9afbfdc093b977e57R42-R47) within detections). ## Testing To test, run one of the offending tests locally and ensure you don't see the above errors, e.g. from kibana root: ```bash node scripts/jest.js --runTestsByPath x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_dashboard.test.tsx ``` <p align="center"> <img width="700" src="https://github.com/elastic/kibana/assets/2946766/a14460bf-214e-42b5-a1dd-6c3557bf38a7" /> </p> ### Checklist Delete any items that are not applicable to this PR. - [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
CoenWarmer
pushed a commit
to CoenWarmer/kibana
that referenced
this pull request
Feb 15, 2024
…yClient functions (elastic#175266) ## Summary After elastic#174317, some of our Security Solution tests got quite noisy with the following errors: <p align="center"> <img width="700" src="https://github.com/elastic/kibana/assets/2946766/c3a31a3e-e9f2-4b5b-97f7-097bee517d02" /> </p> This PR adds additional mocks to the SecuritySolution `QueryClient` to quiet the noise. Note, there was no underlying issue here, I had just missed adding these new mocks to the main SecuritySolution QueryClient (they were added to the [other one](https://github.com/elastic/kibana/pull/174317/files#diff-f6898b396527248e4f5b8fcb0a87d917e9787ca3956dbae9afbfdc093b977e57R42-R47) within detections). ## Testing To test, run one of the offending tests locally and ensure you don't see the above errors, e.g. from kibana root: ```bash node scripts/jest.js --runTestsByPath x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_dashboard.test.tsx ``` <p align="center"> <img width="700" src="https://github.com/elastic/kibana/assets/2946766/a14460bf-214e-42b5-a1dd-6c3557bf38a7" /> </p> ### Checklist Delete any items that are not applicable to this PR. - [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
CoenWarmer
pushed a commit
to CoenWarmer/kibana
that referenced
this pull request
Feb 15, 2024
…yClient functions (elastic#175266) ## Summary After elastic#174317, some of our Security Solution tests got quite noisy with the following errors: <p align="center"> <img width="700" src="https://github.com/elastic/kibana/assets/2946766/c3a31a3e-e9f2-4b5b-97f7-097bee517d02" /> </p> This PR adds additional mocks to the SecuritySolution `QueryClient` to quiet the noise. Note, there was no underlying issue here, I had just missed adding these new mocks to the main SecuritySolution QueryClient (they were added to the [other one](https://github.com/elastic/kibana/pull/174317/files#diff-f6898b396527248e4f5b8fcb0a87d917e9787ca3956dbae9afbfdc093b977e57R42-R47) within detections). ## Testing To test, run one of the offending tests locally and ensure you don't see the above errors, e.g. from kibana root: ```bash node scripts/jest.js --runTestsByPath x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_dashboard.test.tsx ``` <p align="center"> <img width="700" src="https://github.com/elastic/kibana/assets/2946766/a14460bf-214e-42b5-a1dd-6c3557bf38a7" /> </p> ### Checklist Delete any items that are not applicable to this PR. - [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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport:skip
This commit does not require backporting
chore
Feature:Security Assistant
Security Assistant
release_note:skip
Skip the PR/issue when compiling release notes
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
v8.13.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
After #174317, some of our Security Solution tests got quite noisy with the following errors:
This PR adds additional mocks to the SecuritySolution
QueryClient
to quiet the noise. Note, there was no underlying issue here, I had just missed adding these new mocks to the main SecuritySolution QueryClient (they were added to the other one within detections).Testing
To test, run one of the offending tests locally and ensure you don't see the above errors, e.g. from kibana root:
Checklist
Delete any items that are not applicable to this PR.