-
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
[Fleet] Add tests for parseAndVerifyArchive
method
#147050
Labels
Team:Fleet
Team label for Observability Data Collection Fleet team
technical debt
Improvement of the software architecture and operational architecture
Comments
kpollich
added
the
Team:Fleet
Team label for Observability Data Collection Fleet team
label
Dec 5, 2022
Pinging @elastic/fleet (Team:Fleet) |
jen-huang
added
the
technical debt
Improvement of the software architecture and operational architecture
label
Dec 6, 2022
May be related: elastic/package-spec#322 |
kpollich
added a commit
that referenced
this issue
Jan 24, 2023
) ## Summary Fixes package archive parsing logic for the `index_template_data_stream.hidden` property, implemented in line with other `index_template.*` "dotted property name" values from package manifests. ## To test Create a test package that includes `elasticsearch.index_template.data_stream.hidden: true` in a `data_stream/**/manifest.yml` file, install the package, then verify (via dev tools - NOT stack management!!!) that the generated index template contains `data_stream.hidden: true` ![image](https://user-images.githubusercontent.com/6766512/214155715-1a78a7f6-cde0-4cb1-a6e3-fd1ac3749f1e.png) It'd be great to have automated tests around this, but testing our archive parsing logic is very challenging due to the nature of reading directories/files and how much mocking is required. See #147050. I'll see about adding an integration test for this.
Seems like it. We can reopen if more tests are needed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Team:Fleet
Team label for Observability Data Collection Fleet team
technical debt
Improvement of the software architecture and operational architecture
Add tests to the
parseAndVerify
archive method that reads packagemanifest.yml
files and generatespackageInfo
objects from them. We want to ensure that we're parsing all expected content as expected from package manifests.kibana/x-pack/plugins/fleet/server/services/epm/archive/parse.ts
Line 175 in a433b64
This is a somewhat challenging method to test, as we rely on reading YML buffers from the archive cache, so a substantial amount of mocking is required. Consider refactoring to make this process more testable as it's a crucial step in Fleet's business logic.
The text was updated successfully, but these errors were encountered: