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

Tests: Add support for custom contexts to mock scripts #34100

Merged
merged 5 commits into from
Sep 27, 2018

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Sep 27, 2018

This commit adds the ability to plug in compilation of custom contexts
in mock script engine. This is needed for testing plugins which add
custom contexts like watcher.

This commit adds the ability to plug in compilation of custom contexts
in mock script engine. This is needed for testing plugins which add
custom contexts like watcher.
@rjernst rjernst added >enhancement :Delivery/Build Build or test infrastructure :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache v7.0.0 v6.6.0 labels Sep 27, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@rjernst
Copy link
Member Author

rjernst commented Sep 27, 2018

@elasticmachine test this please

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

The change to MockScriptEngine looks good, but some classes are missing from this PR.

import org.elasticsearch.xpack.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.xpack.watcher.transform.script.WatcherTransformScript;
Copy link
Member

Choose a reason for hiding this comment

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

It looks like the WatcherConditionScript and WatcherTransformScript classes are missing from this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, this change was for a different PR (that depends on this on).

Copy link
Member Author

Choose a reason for hiding this comment

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

I pushed ebe9b49 to remove it.

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM

@rjernst
Copy link
Member Author

rjernst commented Sep 27, 2018

@elasticmachine run the java11 tests

@rjernst rjernst merged commit a2c9418 into elastic:master Sep 27, 2018
@rjernst rjernst deleted the script_custom_mockengine branch September 27, 2018 19:24
rjernst added a commit that referenced this pull request Sep 27, 2018
This commit adds the ability to plug in compilation of custom contexts
in mock script engine. This is needed for testing plugins which add
custom contexts like watcher.
kcm pushed a commit that referenced this pull request Oct 30, 2018
This commit adds the ability to plug in compilation of custom contexts
in mock script engine. This is needed for testing plugins which add
custom contexts like watcher.
@jpountz jpountz removed the :Delivery/Build Build or test infrastructure label Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants