-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add enrich policy GET API #41384
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
Add enrich policy GET API #41384
Conversation
This commit wires up the Rest calls and Transport calls for GET enrich policy, as well as tests and rest spec additions.
Pinging @elastic/es-core-features |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left two comments here too. Lets get #41383 first, so that tests can be adapted.
if (policy == null) { | ||
throw new ResourceNotFoundException("policy [{}] is missing", name); | ||
} | ||
return policy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the two if statements in this method should be merged with EnrichStore#getPolicy(...)
and also tests should move the EnrichStoreTests
. Since the static method will basically by doing nothing, it can be merged with masterOperation(...)
|
||
import static org.elasticsearch.xpack.enrich.EnrichPolicyTests.randomEnrichPolicy; | ||
|
||
public class GetEnrichPolicyActionResponseTests extends AbstractWireSerializingTestCase<GetEnrichPolicyAction.Response> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this test should extend AbstractSerializingTestCase
, so that xcontent serialization is also tested.
I went ahead and removed this transport test as well, ala #41383 (comment), and fixed up the enrich store based on the review. |
@elasticmachine run elasticsearch-ci/1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@elasticmachine run elasticsearch-ci/1 |
@elasticmachine run elasticsearch-ci/1 |
This commit wires up the Rest calls and Transport calls for GET enrich policy, as well as tests and rest spec additions.
This commit wires up the Rest calls and Transport calls for GET enrich
policy, as well as tests and rest spec additions.