Skip to content

Ensure testers create policies from built packages#3576

Open
jsoriano wants to merge 3 commits into
elastic:mainfrom
jsoriano:script-tests-built-manifest
Open

Ensure testers create policies from built packages#3576
jsoriano wants to merge 3 commits into
elastic:mainfrom
jsoriano:script-tests-built-manifest

Conversation

@jsoriano
Copy link
Copy Markdown
Member

@jsoriano jsoriano commented May 18, 2026

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_policy in 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 --version is provided, the package is obtained from EPR, and thus it is already built, if --version is 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.

@elasticmachine
Copy link
Copy Markdown
Collaborator

elasticmachine commented May 18, 2026

💔 Build Failed

Failed CI Steps

History

cc @jsoriano

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add_package_policy -version in script tests fails: CreatePackagePolicy resolves to build directory instead of EPR-extracted root

2 participants