-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add enrich qa module for rest tests and (#41568)
move put policy api yaml test to this rest module. The main benefit is that all tests will then be run when running: `./gradlew -p x-pack/plugin/enrich check` The rest qa module starts a node with default distribution and basic license. This qa module will also be used for adding different rest tests (not yaml), for example rest tests needed for #41532 Also when we are going to work on security integration then we can add a security qa module under the qa folder. Also at some point we should add a multi node qa module.
- Loading branch information
Showing
5 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import org.elasticsearch.gradle.test.RestIntegTestTask | ||
|
||
apply plugin: 'elasticsearch.build' | ||
test.enabled = false | ||
|
||
dependencies { | ||
compile project(':test:framework') | ||
} | ||
|
||
subprojects { | ||
project.tasks.withType(RestIntegTestTask) { | ||
final File xPackResources = new File(xpackProject('plugin').projectDir, 'src/test/resources') | ||
project.copyRestSpec.from(xPackResources) { | ||
include 'rest-api-spec/api/**' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import org.elasticsearch.gradle.test.RestIntegTestTask | ||
|
||
apply plugin: 'elasticsearch.standalone-test' | ||
|
||
dependencies { | ||
testCompile project(path: xpackModule('enrich'), configuration: 'runtime') | ||
} | ||
|
||
task restTest(type: RestIntegTestTask) { | ||
mustRunAfter(precommit) | ||
} | ||
|
||
restTestCluster { | ||
distribution 'default' | ||
setting 'xpack.license.self_generated.type', 'basic' | ||
} | ||
|
||
check.dependsOn restTest | ||
test.enabled = false |
24 changes: 24 additions & 0 deletions
24
x-pack/plugin/enrich/qa/rest/src/test/java/org/elasticsearch/xpack/enrich/EnrichRestIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* 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.xpack.enrich; | ||
|
||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; | ||
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; | ||
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; | ||
|
||
public class EnrichRestIT extends ESClientYamlSuiteTestCase { | ||
|
||
public EnrichRestIT(final ClientYamlTestCandidate testCandidate) { | ||
super(testCandidate); | ||
} | ||
|
||
@ParametersFactory | ||
public static Iterable<Object[]> parameters() throws Exception { | ||
return ESClientYamlSuiteTestCase.createParameters(); | ||
} | ||
|
||
} |
File renamed without changes.