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

Allow overriding of plugin metadata files in integration tests #120245

Merged

Conversation

mark-vieira
Copy link
Contributor

Provide a mechanism to override certain metadata in Elasticsearch plugins when installing them into test clusters. This first iteration provides methods for supplying overrides to the plugin-descriptor.properties and entitlement-policy.yaml files. When configuring a test cluster to install a plugin you can now optionally configure overrides by way of a function which receives the previous file's contents and returns a Resource to be used as the new contents.

An example of replacing an entitlement in the plugin policy file could look like so:

    @ClassRule
    public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
        .plugin(
            "discovery-gce",
            spec -> spec.withEntitlementsOverride(
                original -> Resource.fromString(original.replace("set_https_connection_properties", "create_class_loader"))
            )
        )
        .build();

@mark-vieira mark-vieira added >test Issues or PRs that are addressing/adding tests :Delivery/Build Build or test infrastructure auto-backport Automatically create backport pull requests when merged v8.18.0 v8.17.2 v8.16.4 labels Jan 15, 2025
@mark-vieira mark-vieira requested a review from rjernst January 15, 2025 23:51
@elasticsearchmachine elasticsearchmachine added Team:Delivery Meta label for Delivery team v9.0.0 labels Jan 15, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x
8.17
8.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team >test Issues or PRs that are addressing/adding tests v8.16.4 v8.17.2 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants