[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:
Martijn van Groningen 2017-02-17 19:41:00 +01:00
parent d707a1c977
commit 92a4b97f6d
1 changed files with 13 additions and 1 deletions

View File

@ -21,9 +21,20 @@ import java.util.Map;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
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 {
@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 {
String jobId = "foo1";
createFarequoteJob(jobId);
@ -76,6 +87,7 @@ public class MlBasicMultiNodeIT extends ESRestTestCase {
assertEquals(200, response.getStatusLine().getStatusCode());
}
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/592")
public void testMiniFarequoteWithDatafeeder() throws Exception {
String mappings = "{"
+ " \"mappings\": {"