-
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
Splits repository api unit tests into individual tests #173218
Splits repository api unit tests into individual tests #173218
Conversation
Pinging @elastic/kibana-core (Team:Core) |
@elasticmachine merge upstream |
FYI @elastic/kibana-security |
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.
Great work, this will help significantly for maintainability!
Note, I didn't check the full content of each test, as I assume it was mostly moving things around, but the files I checked made sense, so does the split.
// BEWARE: The SavedObjectClient depends on the implementation details of the SavedObjectsRepository | ||
// so any breaking changes to this repository are considered breaking changes to the SavedObjectsClient. |
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.
NIT: no really sure why that comment was on the SOR test file in the first place, seems like something that was very old. I think we should remove it from all those files now.
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.
Done: 8276f13
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Unknown metric groupsESLint disabled in files
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Summary
Structural cleanup of the
SavedObjectsRepository
, continued from where #157154 left off.This PR holds changes to
repository.test.ts
, and splits the api unit tests into dedicated test files next to the api implementation.Tests
This PR does not alter test coverage, its primary aim is to improve DevEx when it comes to SOR api unit testing. Hopefully, it'll make life easier for everyone touching the code.