-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add statestore test helpers and unit tests #19227
Conversation
This change introduces the libbeat/statestore/storetest package and unit tests to the statestore frontend itself. The storetest package provides helpers for writing tests. For example does it emulate a key value store in memory by storing all k/v-pairs in a map[string]interface{}, that can optionally provided by users. The internal storecompliance test-suite is used to validate the storetest package to be fully compatible with the statestore requirements. The addition of the statestore package is split up into multiple changeset to ease review. The final version of the package can be found [here](https://github.com/urso/beats/tree/fb-input-v2-combined/libbeat/statestore). Once finalized, the libbeat/statestore package contains: - The statestore frontend and interface for use within Beats - Interfaces for the store backend - A common set of tests store backends need to support - a storetest package for testing new features that require a store. The testing helpers use map[string]interface{} that can be initialized or queried after the test run for validation purposes. - The default memlog backend + tests This change introduces the second last item to libbeat: test helpers and additional unit tests.
Pinging @elastic/integrations-services (Team:Services) |
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
Add statestore test helpers and unit tests This change introduces the libbeat/statestore/storetest package and unit tests to the statestore frontend itself. The storetest package provides helpers for writing tests. For example does it emulate a key value store in memory by storing all k/v-pairs in a map[string]interface{}, that can optionally provided by users. The internal storecompliance test-suite is used to validate the storetest package to be fully compatible with the statestore requirements. The addition of the statestore package is split up into multiple changeset to ease review. The final version of the package can be found [here](https://github.com/urso/beats/tree/fb-input-v2-combined/libbeat/statestore). Once finalized, the libbeat/statestore package contains: - The statestore frontend and interface for use within Beats - Interfaces for the store backend - A common set of tests store backends need to support - a storetest package for testing new features that require a store. The testing helpers use map[string]interface{} that can be initialized or queried after the test run for validation purposes. - The default memlog backend + tests This change introduces the second last item to libbeat: test helpers and additional unit tests. (cherry picked from commit 372c3ae)
…#19689) Add statestore test helpers and unit tests This change introduces the libbeat/statestore/storetest package and unit tests to the statestore frontend itself. The storetest package provides helpers for writing tests. For example does it emulate a key value store in memory by storing all k/v-pairs in a map[string]interface{}, that can optionally provided by users. The internal storecompliance test-suite is used to validate the storetest package to be fully compatible with the statestore requirements. The addition of the statestore package is split up into multiple changeset to ease review. The final version of the package can be found [here](https://github.com/urso/beats/tree/fb-input-v2-combined/libbeat/statestore). Once finalized, the libbeat/statestore package contains: - The statestore frontend and interface for use within Beats - Interfaces for the store backend - A common set of tests store backends need to support - a storetest package for testing new features that require a store. The testing helpers use map[string]interface{} that can be initialized or queried after the test run for validation purposes. - The default memlog backend + tests This change introduces the second last item to libbeat: test helpers and additional unit tests. (cherry picked from commit 372c3ae)
Add statestore test helpers and unit tests This change introduces the libbeat/statestore/storetest package and unit tests to the statestore frontend itself. The storetest package provides helpers for writing tests. For example does it emulate a key value store in memory by storing all k/v-pairs in a map[string]interface{}, that can optionally provided by users. The internal storecompliance test-suite is used to validate the storetest package to be fully compatible with the statestore requirements. The addition of the statestore package is split up into multiple changeset to ease review. The final version of the package can be found [here](https://github.com/urso/beats/tree/fb-input-v2-combined/libbeat/statestore). Once finalized, the libbeat/statestore package contains: - The statestore frontend and interface for use within Beats - Interfaces for the store backend - A common set of tests store backends need to support - a storetest package for testing new features that require a store. The testing helpers use map[string]interface{} that can be initialized or queried after the test run for validation purposes. - The default memlog backend + tests This change introduces the second last item to libbeat: test helpers and additional unit tests.
What does this PR do?
This change introduces the libbeat/statestore/storetest package and unit
tests to the statestore frontend itself.
The storetest package provides helpers for writing tests. For example
does it emulate a key value store in memory by storing all k/v-pairs
in a map[string]interface{}, that can optionally provided by users.
The internal storecompliance test-suite is used to validate the
storetest package to be fully compatible with the statestore
requirements.
The addition of the statestore package is split up into multiple
changeset to ease review. The final version of the package can be found
here.
Once finalized, the libbeat/statestore package contains:
testing helpers use map[string]interface{} that can be initialized or
queried after the test run for validation purposes.
This change introduces the second last item to libbeat: test helpers and
additional unit tests.
Test coverage of statetest package:
Test coverage of statestore package:
Why is it important?
The statestore introduces a simple key-value store to Beats. The statestore will be used to replace the registry in filebeat in the future.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files- [ ] I have added an entry inCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
Related issues