[TEST] Add simple test, so that module has at least one working test.
Original commit: elastic/x-pack-elasticsearch@72441418ac
This commit is contained in:
parent
d707a1c977
commit
92a4b97f6d
|
@ -21,9 +21,20 @@ import java.util.Map;
|
||||||
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
|
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||||
import static org.elasticsearch.common.xcontent.XContentType.JSON;
|
import static org.elasticsearch.common.xcontent.XContentType.JSON;
|
||||||
|
|
||||||
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/592")
|
|
||||||
public class MlBasicMultiNodeIT extends ESRestTestCase {
|
public class MlBasicMultiNodeIT extends ESRestTestCase {
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public void testMachineLearningInstalled() throws Exception {
|
||||||
|
Response response = client().performRequest("get", "/_xpack");
|
||||||
|
assertEquals(200, response.getStatusLine().getStatusCode());
|
||||||
|
Map<String, Object> features = (Map<String, Object>) responseEntityToMap(response).get("features");
|
||||||
|
Map<String, Object> ml = (Map<String, Object>) features.get("ml");
|
||||||
|
assertNotNull(ml);
|
||||||
|
assertTrue((Boolean) ml.get("available"));
|
||||||
|
assertTrue((Boolean) ml.get("enabled"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/592")
|
||||||
public void testMiniFarequote() throws Exception {
|
public void testMiniFarequote() throws Exception {
|
||||||
String jobId = "foo1";
|
String jobId = "foo1";
|
||||||
createFarequoteJob(jobId);
|
createFarequoteJob(jobId);
|
||||||
|
@ -76,6 +87,7 @@ public class MlBasicMultiNodeIT extends ESRestTestCase {
|
||||||
assertEquals(200, response.getStatusLine().getStatusCode());
|
assertEquals(200, response.getStatusLine().getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/592")
|
||||||
public void testMiniFarequoteWithDatafeeder() throws Exception {
|
public void testMiniFarequoteWithDatafeeder() throws Exception {
|
||||||
String mappings = "{"
|
String mappings = "{"
|
||||||
+ " \"mappings\": {"
|
+ " \"mappings\": {"
|
||||||
|
|
Loading…
Reference in New Issue