Ensure testers create policies from built packages#3576
Open
jsoriano wants to merge 3 commits into
Open
Conversation
Collaborator
💔 Build Failed
Failed CI StepsHistory
cc @jsoriano |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most testers should work with built packages. This is specially relevant as we introduce more processing in build time, as we recently did with composable packages, but we also do with external and ECS fields, dashboards and so on. The source of a package is not reliable for functional testing.
This change address this issue when creating policies from packages. System tester already builds and uses built packages, but some steps in script tester need more flexibility, while still ensuring that they are using built packages when needed.
The helper used to create policies and shared by the system and test runner is moved to the kibana package. It is refactored to expect already read manifests, so each tester can decide their source for built manifests.
System tester remains mostly as is, only delegating creation of policy templates to the kibana package.
add_package_policyin the script tester stops assuming that it can receive a source manifest. Decision on where to read the manifest from is now based on explicit parameters and not on features specific to composable packages. If--versionis provided, the package is obtained from EPR, and thus it is already built, if--versionis not provided, the content is read from a local build.Apart from some unit tests, a new integration test is added that performs an upgrade test for a composable package using the script test runner.
Fixes #3552.