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

improve plugin integration tests #12654

Closed
rmuir opened this issue Aug 4, 2015 · 7 comments
Closed

improve plugin integration tests #12654

rmuir opened this issue Aug 4, 2015 · 7 comments
Assignees
Labels
good first issue low hanging fruit help wanted adoptme >test Issues or PRs that are addressing/adding tests v2.0.0-rc1

Comments

@rmuir
Copy link
Contributor

rmuir commented Aug 4, 2015

Currently some of these are very minimal:

  • cloud plugins just check the plugin was installed
  • most analyzer plugins just check the analyze api (ideally they have one that indexes a document too)

Improving these with additional rest tests would be great. The analyzer ones should be relatively simple tests.

@rmuir rmuir added >test Issues or PRs that are addressing/adding tests v2.0.0-beta1 help wanted adoptme labels Aug 4, 2015
@nik9000 nik9000 added the good first issue low hanging fruit label Aug 4, 2015
@nik9000
Copy link
Member

nik9000 commented Aug 4, 2015

This issue itself isn't really low hanging fruit - but lots of the tests @rmuir is proposing certainly are. They would be a great place for any contributor to start.

Cloud plugins are hard - to really test them you need to run them against the cloud environment. I don't know how many of those environments have public test instances....

@rmuir
Copy link
Contributor Author

rmuir commented Aug 4, 2015

Actually @dadoonet did a lot of work to improve the analysis tests that i described here recently. So they might be in good shape at the moment. But still might be worth looking at analysis/ and lang/ plugins to see if there are gaps.

I agree the cloud plugins are hard. Ideally we would setup a mock in pre-integration-test or something like that, even if its a limited mock of the service.

@nik9000
Copy link
Member

nik9000 commented Aug 4, 2015

I agree the cloud plugins are hard. Ideally we would setup a mock in pre-integration-test or something like that, even if its a limited mock of the service.

Yeah - mocks are fun because you can simulate failure modes.

@dadoonet
Copy link
Member

dadoonet commented Aug 4, 2015

Well about mock, I tried to do some mocking for azure. For example: https://github.com/elastic/elasticsearch-cloud-azure/blob/master/src/test/java/org/elasticsearch/cloud/azure/management/AzureComputeServiceTwoNodesMock.java

Would be easier may be if we could use something like Mockito ?

@nik9000
Copy link
Member

nik9000 commented Aug 4, 2015

Would be easier may be if we could use something like Mockito ?

I've used Mockito when testing other Elasticsearch plugins pretty successfully - but its not really as good as having a real mock service you can play with because you don't test the full communication paths. Mockito is one of those things that untethers you from reality a bit too easy.

@clintongormley
Copy link
Contributor

I'll take this and work on rest tests for the non-cloud plugins. Cloud plugins will be dealt with by #12719

@clintongormley
Copy link
Contributor

Had a look at the existing REST tests and we seem to be pretty well covered here. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue low hanging fruit help wanted adoptme >test Issues or PRs that are addressing/adding tests v2.0.0-rc1
Projects
None yet
Development

No branches or pull requests

5 participants