Skip to content
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

Validate variables specified in system tests #2186

Open
andrewkroh opened this issue Oct 28, 2024 · 0 comments
Open

Validate variables specified in system tests #2186

andrewkroh opened this issue Oct 28, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@andrewkroh
Copy link
Member

andrewkroh commented Oct 28, 2024

When a developer writes a system test config like _dev/test/system/test-*-config.yml, they can specify variables that are to be passed in the POST /api/fleet/package_policies fleet API request.

As was observed in elastic/integrations#11554, there is no validation that the variables specified are correct. The feature request is to make elastic-package validate that the variables used in the test config actually correspond to real variables defined in the package or data stream manifests, and that they match the "level" at which they are defined in the package.

The fact that incorrect variables are accepted probably means the POST /api/fleet/package_policies fleet API is not strict about validating the specified parameters exist.

Surprisingly, there are only two levels of variables listed in the code when there are four levels of variables in packages (integration, policy template, policy template input, data stream). We should probably expand the test config to match with 4 "levels".

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant