Marvel: Add integration test

Closes elastic/elasticsearch#314

Original commit: elastic/x-pack-elasticsearch@9c5d3ab862
This commit is contained in:
Tanguy Leroux 2015-07-21 21:42:13 +02:00
parent 7609d5f823
commit deb6391c10
3 changed files with 45 additions and 2 deletions

View File

@ -17,8 +17,8 @@
<properties> <properties>
<elasticsearch.integ.antfile>dev-tools/integration-tests.xml</elasticsearch.integ.antfile> <elasticsearch.integ.antfile>dev-tools/integration-tests.xml</elasticsearch.integ.antfile>
<!-- FIXME add a integration test --> <tests.rest.suite>marvel</tests.rest.suite>
<skip.integ.tests>true</skip.integ.tests> <tests.rest.load_packaged>false</tests.rest.load_packaged>
</properties> </properties>
<dependencies> <dependencies>

View File

@ -0,0 +1,16 @@
# Integration tests for Marvel plugin
#
"Marvel loaded":
- do:
cluster.state: {}
# Get master node id
- set: { master_node: master }
- do:
nodes.info: {}
- match: { nodes.$master.plugins.0.name: license }
- match: { nodes.$master.plugins.0.jvm: true }
- match: { nodes.$master.plugins.1.name: marvel }
- match: { nodes.$master.plugins.1.jvm: true }

View File

@ -0,0 +1,27 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
package org.elasticsearch.marvel;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
public class MarvelRestIT extends ElasticsearchRestTestCase {
public MarvelRestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
}
@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
return ElasticsearchRestTestCase.createParameters(0, 1);
}
}