-
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
[Security Solution] Unskip remaining Jest tests from RAC rules migration #122677
[Security Solution] Unskip remaining Jest tests from RAC rules migration #122677
Conversation
💛 Build succeeded, but was flaky
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @madirey |
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
getAlertMock(isRuleRegistryEnabled, getQueryRuleParams()) | ||
); | ||
clients.rulesClient.find.mockResolvedValue(getFindResultWithSingleHit(true)); | ||
clients.rulesClient.update.mockResolvedValue(getAlertMock(true, getQueryRuleParams())); |
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.
Can getAlertMock
be refactored to remove the isRuleRegistryEnabled
param now that we're in 8.0
, or are there situations where it can still be disabled (and tested)?
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.
One nit about if we can refactor getMockRule
, but other than that LGTM! Thanks for looping back to unskip these and the additional details in the description @madirey! 🙂 🎉
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.
I had the same question about getAlertMock
as Garret, but otherwise LGTM!
@@ -107,7 +107,7 @@ describe('AlertSummaryView', () => { | |||
); | |||
expect(container.querySelector('div[data-test-subj="summary-view"]')).toMatchSnapshot(); |
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.
For posterity: it looks like these component/snapshot changes are due to the work done in #120347.
@@ -149,14 +148,19 @@ describe.skip('StepAboutRuleComponent', () => { | |||
</ThemeProvider> | |||
); | |||
|
|||
wrapper |
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.
Should these DOM interactions not be contained within the act
below? My understanding was that act
allows the test framework to register/process/flush any changes to the DOM. If it works it works, but my concern is that these might break in the future. Happy to be corrected, though!
…ion (elastic#122677) * Regenerate snapshot of memory event summary rows * Regenerate snapshot of behavior event summary rows * Unskip StepAboutRuleComponent tests * Unskip add_prepackaged_rules tests * Unskip update_rules tests (cherry picked from commit c9dcd93)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
1 similar comment
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
25 similar comments
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Summary
This gives us the remaining coverage from when tests were skipped during the process of migrating to the new rules and alerts schema for 8.0.
Most of the tests would have already been passing, aside from internal unrelated changes that occurred while the tests were disabled. For those tests, I've documented the commits that necessitated test changes below.
Tests
Checklist
Delete any items that are not applicable to this PR.
For maintainers