Add simple integ testing infra
This commit is contained in:
parent
3084bed194
commit
80871bae2b
|
@ -1053,6 +1053,10 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* Licensed to Elasticsearch under one or more contributor
|
||||||
|
* license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright
|
||||||
|
* ownership. Elasticsearch licenses this file to you under
|
||||||
|
* the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.elasticsearch.test.rest;
|
||||||
|
|
||||||
|
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||||
|
|
||||||
|
import org.elasticsearch.test.rest.parser.RestTestParseException;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/** Rest integration test. runs against external cluster in 'mvn verify' */
|
||||||
|
public class RestIT extends ElasticsearchRestTestCase {
|
||||||
|
public RestIT(RestTestCandidate testCandidate) {
|
||||||
|
super(testCandidate);
|
||||||
|
}
|
||||||
|
// we run them all sequentially: start simple!
|
||||||
|
@ParametersFactory
|
||||||
|
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
|
||||||
|
return createParameters(0, 1);
|
||||||
|
}
|
||||||
|
}
|
|
@ -466,7 +466,7 @@ def smoke_test_release(release, files, expected_hash, plugins):
|
||||||
if version['build_hash'].strip() != expected_hash:
|
if version['build_hash'].strip() != expected_hash:
|
||||||
raise RuntimeError('HEAD hash does not match expected [%s] but got [%s]' % (expected_hash, version['build_hash']))
|
raise RuntimeError('HEAD hash does not match expected [%s] but got [%s]' % (expected_hash, version['build_hash']))
|
||||||
print(' Running REST Spec tests against package [%s]' % release_file)
|
print(' Running REST Spec tests against package [%s]' % release_file)
|
||||||
run_mvn('test -Dtests.cluster=%s -Dtests.class=*.*RestTests' % ("127.0.0.1:9300"))
|
run_mvn('test -Dtests.cluster=%s -Dtests.jvms=1 -Dtests.class=*.*RestTests' % ("127.0.0.1:9300"))
|
||||||
print(' Verify if plugins are listed in _nodes')
|
print(' Verify if plugins are listed in _nodes')
|
||||||
conn.request('GET', '/_nodes?plugin=true&pretty=true')
|
conn.request('GET', '/_nodes?plugin=true&pretty=true')
|
||||||
res = conn.getresponse()
|
res = conn.getresponse()
|
||||||
|
|
27
pom.xml
27
pom.xml
|
@ -33,6 +33,7 @@
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<!-- elasticsearch stack -->
|
<!-- elasticsearch stack -->
|
||||||
<elasticsearch.version>2.0.0-SNAPSHOT</elasticsearch.version>
|
<elasticsearch.version>2.0.0-SNAPSHOT</elasticsearch.version>
|
||||||
<jvm.executable>${java.home}${file.separator}bin${file.separator}java</jvm.executable>
|
<jvm.executable>${java.home}${file.separator}bin${file.separator}java</jvm.executable>
|
||||||
|
@ -101,6 +102,8 @@
|
||||||
<tests.security.manager>true</tests.security.manager>
|
<tests.security.manager>true</tests.security.manager>
|
||||||
<tests.compatibility></tests.compatibility>
|
<tests.compatibility></tests.compatibility>
|
||||||
<tests.ifNoTests>fail</tests.ifNoTests>
|
<tests.ifNoTests>fail</tests.ifNoTests>
|
||||||
|
<skip.unit.tests>${skipTests}</skip.unit.tests>
|
||||||
|
<skip.integ.tests>${skipTests}</skip.integ.tests>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -570,6 +573,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<jvm>${jvm.executable}</jvm>
|
<jvm>${jvm.executable}</jvm>
|
||||||
<argLine>${tests.jvm.argline}</argLine>
|
<argLine>${tests.jvm.argline}</argLine>
|
||||||
|
<skipTests>${skip.unit.tests}</skipTests>
|
||||||
<heartbeat>10</heartbeat>
|
<heartbeat>10</heartbeat>
|
||||||
<jvmOutputAction>warn</jvmOutputAction>
|
<jvmOutputAction>warn</jvmOutputAction>
|
||||||
<leaveTemporary>true</leaveTemporary>
|
<leaveTemporary>true</leaveTemporary>
|
||||||
|
@ -701,6 +705,27 @@
|
||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
|
<version>2.18.1</version>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>${skip.integ.tests}</skipTests>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<es.logger.level>${es.logger.level}</es.logger.level>
|
||||||
|
</systemPropertyVariables>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>run-tests</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>integration-test</goal>
|
||||||
|
<goal>verify</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
@ -1239,7 +1264,7 @@ org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UT
|
||||||
<id>tests-top-hints</id>
|
<id>tests-top-hints</id>
|
||||||
<phase>test</phase>
|
<phase>test</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>${skipTests}</skip>
|
<skip>${skip.unit.tests}</skip>
|
||||||
<!-- don't run if we skip the tests -->
|
<!-- don't run if we skip the tests -->
|
||||||
<failOnError>false</failOnError>
|
<failOnError>false</failOnError>
|
||||||
<target>
|
<target>
|
||||||
|
|
Loading…
Reference in New Issue