-
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
[IndexPatterns] Clean up StubIndexPattern
#108555
Conversation
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.
Looks great! Huge improvement. 🚀
Pinging @elastic/kibana-app-services (Team:AppServices) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
Exploratory view change LGTM!
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
LGTM, just tests affected so didn't checkout and test, Code review KibanaApp owned code
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Co-authored-by: Anton Dosov <[email protected]>
Summary
Close #78519
This pr cleans up a bit of unit tests code that uses
StubIndexPattern
exported from the data plugin.What was done:
IndexPattern
instance.logstash
index pattern that is used in a bunch of Discover's and some other tests. All the/fixtures/logstash_fields.js
were moved near the stub and I a bit restructured it for this.common
and inpublic
code. The difference is thatpublic
code uses a realpublic
field formats registry by default, whereascommon
use a dummy mock of it.How to use:
Existing stub
You can use
jest.spyOn
to track usage and provide mock implementation instead of creating a custom index pattern as a shortcut. Don't forget to reset mocks in your tests.Custom stub