Skip to content

Commit

Permalink
Rename client yaml test infrastructure
Browse files Browse the repository at this point in the history
This makes it obvious that these tests are for running the client yaml
suites. Now that there are other ways of running tests using the REST
client against a running cluster we can't go on calling the shared
client yaml tests "REST tests". They are rest tests, but they aren't
**the** rest tests.
  • Loading branch information
nik9000 committed Jul 26, 2016
1 parent 0553ba9 commit 9270e8b
Show file tree
Hide file tree
Showing 115 changed files with 870 additions and 823 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void testExceptionRegistration()
final Path startPath = PathUtils.get(ElasticsearchException.class.getProtectionDomain().getCodeSource().getLocation().toURI())
.resolve("org").resolve("elasticsearch");
final Set<? extends Class<?>> ignore = Sets.newHashSet(
org.elasticsearch.test.rest.parser.RestTestParseException.class,
org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException.class,
CancellableThreadsTests.CustomException.class,
org.elasticsearch.rest.BytesRestResponseTests.WithHeadersException.class,
AbstractClientHeadersTestCase.InternalException.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@
package org.elasticsearch.test.rest;

import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.rest.parser.RestTestParseException;

import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException;

import java.io.IOException;

/** Rest integration test. Runs against a cluster started by {@code gradle integTest} */
public class RestIT extends ESClientYamlSuiteTestCase {
public RestIT(RestTestCandidate testCandidate) {
public class DebClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
public DebClientYamlTestSuiteIT(ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
public static Iterable<Object[]> parameters() throws IOException, ClientYamlTestParseException {
return createParameters(0, 1);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* 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.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException;

import java.io.IOException;

/** Rest integration test. Runs against a cluster started by {@code gradle integTest} */
public class IntegTestZipClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
public IntegTestZipClientYamlTestSuiteIT(ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, ClientYamlTestParseException {
return createParameters(0, 1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@
package org.elasticsearch.test.rest;

import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.rest.parser.RestTestParseException;

import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException;

import java.io.IOException;

/** Rest integration test. Runs against a cluster started by {@code gradle integTest} */
public class RestIT extends ESClientYamlSuiteTestCase {
public RestIT(RestTestCandidate testCandidate) {
public class RpmClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
public RpmClientYamlTestSuiteIT(ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
public static Iterable<Object[]> parameters() throws IOException, ClientYamlTestParseException {
return createParameters(0, 1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@
package org.elasticsearch.test.rest;

import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.rest.parser.RestTestParseException;

import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException;

import java.io.IOException;

/** Rest integration test. Runs against a cluster started by {@code gradle integTest} */
public class RestIT extends ESClientYamlSuiteTestCase {
public RestIT(RestTestCandidate testCandidate) {
public class TarClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
public TarClientYamlTestSuiteIT(ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
public static Iterable<Object[]> parameters() throws IOException, ClientYamlTestParseException {
return createParameters(0, 1);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@
package org.elasticsearch.test.rest;

import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.rest.parser.RestTestParseException;

import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException;

import java.io.IOException;

/** Rest integration test. Runs against a cluster started by {@code gradle integTest} */
public class RestIT extends ESClientYamlSuiteTestCase {
public RestIT(RestTestCandidate testCandidate) {
public class ZipClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
public ZipClientYamlTestSuiteIT(ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
public static Iterable<Object[]> parameters() throws IOException, ClientYamlTestParseException {
return createParameters(0, 1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;

import org.elasticsearch.test.rest.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException;

import java.io.IOException;
import java.util.List;

public class SmokeTestDocsIT extends ESClientYamlSuiteTestCase {
public class DocsClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

public SmokeTestDocsIT(@Name("yaml") RestTestCandidate testCandidate) {
public DocsClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
public static Iterable<Object[]> parameters() throws IOException, ClientYamlTestParseException {
return ESClientYamlSuiteTestCase.createParameters(0, 1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,20 @@

import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.rest.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;

import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException;

import java.io.IOException;

/**
*
*/
public class MatrixAggregationRestIT extends ESClientYamlSuiteTestCase {
public MatrixAggregationRestIT(@Name("yaml")RestTestCandidate testCandidate) {
public class MatrixStatsClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
public MatrixStatsClientYamlTestSuiteIT(@Name("yaml")ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
public static Iterable<Object[]> parameters() throws IOException, ClientYamlTestParseException {
return ESClientYamlSuiteTestCase.createParameters(0, 1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,21 @@

import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.rest.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;

import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException;

import java.io.IOException;

public class IngestCommonRestIT extends ESClientYamlSuiteTestCase {
public class IngestCommonClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

public IngestCommonRestIT(@Name("yaml") RestTestCandidate testCandidate) {
public IngestCommonClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
public static Iterable<Object[]> parameters() throws IOException, ClientYamlTestParseException {
return ESClientYamlSuiteTestCase.createParameters(0, 1);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,21 @@

import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.rest.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;

import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException;

import java.io.IOException;

public class ExpressionRestIT extends ESClientYamlSuiteTestCase {
public class LangExpressionClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

public ExpressionRestIT(@Name("yaml") RestTestCandidate testCandidate) {
public LangExpressionClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
public static Iterable<Object[]> parameters() throws IOException, ClientYamlTestParseException {
return ESClientYamlSuiteTestCase.createParameters(0, 1);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,21 @@

import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.rest.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;

import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException;

import java.io.IOException;

public class GroovyRestIT extends ESClientYamlSuiteTestCase {
public class LangGroovyClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

public GroovyRestIT(@Name("yaml") RestTestCandidate testCandidate) {
public LangGroovyClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
public static Iterable<Object[]> parameters() throws IOException, ClientYamlTestParseException {
return ESClientYamlSuiteTestCase.createParameters(0, 1);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,21 @@

import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.rest.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;

import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException;

import java.io.IOException;

public class MustacheRestIT extends ESClientYamlSuiteTestCase {
public class LangMustacheClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

public MustacheRestIT(@Name("yaml") RestTestCandidate testCandidate) {
public LangMustacheClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
public static Iterable<Object[]> parameters() throws IOException, ClientYamlTestParseException {
return ESClientYamlSuiteTestCase.createParameters(0, 1);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,22 @@

import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.rest.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;

import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.test.rest.yaml.parser.ClientYamlTestParseException;

import java.io.IOException;

/** Runs yaml rest tests */
public class PainlessRestIT extends ESClientYamlSuiteTestCase {
public class LangPainlessClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

public PainlessRestIT(@Name("yaml") RestTestCandidate testCandidate) {
public LangPainlessClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}

@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
public static Iterable<Object[]> parameters() throws IOException, ClientYamlTestParseException {
return ESClientYamlSuiteTestCase.createParameters(0, 1);
}
}
Expand Down
Loading

0 comments on commit 9270e8b

Please sign in to comment.