Skip to content

[Testing] Add contract testing for agent policies #947

Closed

Description

We have some tooling for testing integrations, but I think there is a gap here. We support two types of tests:

  • Verifying that the basic Elasticsearch and Kibana assets are installable and that the ingest pipeline can ingest data
  • A full end-to-end "system" test that will install Agent and the integration and verify that data is shipped, processed, and index correctly. These are much more work to set up and slower and flakier to execute.

I think we need something in between that validates the final agent policy that is produced by Kibana when the package is rendered with different variable values. This would help in cases like elastic/integrations#3074.

Conceptually these would work like:

  1. Set up Kibana and Elasticsearch
  2. Install the package
  3. For each test scenario
    1. Create a package policy given set of input variables
    2. Assert that the generated agent policy matches what is expected by the package author
    3. Assert that the generated agent policy is a valid one in general (note we actually have no spec for what this is today, so we'd need this)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Team:EcosystemLabel for the Packages Ecosystem teamenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions