2021-04-09 15:28:18 -04:00
|
|
|
/*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* The OpenSearch Contributors require contributions made to
|
|
|
|
* this file be licensed under the Apache-2.0 license or a
|
|
|
|
* compatible open source license.
|
|
|
|
*
|
|
|
|
* Modifications Copyright OpenSearch Contributors. See
|
|
|
|
* GitHub history for details.
|
|
|
|
*/
|
|
|
|
|
2015-11-25 11:58:14 -05:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2018-04-27 14:04:37 -04:00
|
|
|
import org.apache.tools.ant.taskdefs.condition.Os
|
2021-03-09 18:57:16 -05:00
|
|
|
import org.opensearch.gradle.Architecture
|
|
|
|
import org.opensearch.gradle.OS
|
|
|
|
import org.opensearch.gradle.info.BuildParams
|
2018-04-27 14:04:37 -04:00
|
|
|
|
2021-03-09 18:57:16 -05:00
|
|
|
apply plugin: 'opensearch.test-with-dependencies'
|
|
|
|
apply plugin: 'opensearch.jdk-download'
|
|
|
|
apply plugin: 'opensearch.yaml-rest-test'
|
|
|
|
apply plugin: 'opensearch.java-rest-test'
|
|
|
|
apply plugin: 'opensearch.internal-cluster-test'
|
2017-01-19 10:43:53 -05:00
|
|
|
|
2021-03-18 19:14:19 -04:00
|
|
|
opensearchplugin {
|
2016-02-29 10:21:10 -05:00
|
|
|
description 'The Reindex module adds APIs to reindex from one index to another or update documents in place.'
|
2021-03-09 18:57:16 -05:00
|
|
|
classname 'org.opensearch.index.reindex.ReindexPlugin'
|
2016-07-14 04:54:24 -04:00
|
|
|
hasClientJar = true
|
2015-11-25 11:58:14 -05:00
|
|
|
}
|
2016-05-19 12:40:22 -04:00
|
|
|
|
2020-07-13 14:53:05 -04:00
|
|
|
testClusters.all {
|
2018-05-10 08:02:23 -04:00
|
|
|
// Modules who's integration is explicitly tested in integration tests
|
2020-09-03 22:26:44 -04:00
|
|
|
module ':modules:parent-join'
|
|
|
|
module ':modules:lang-painless'
|
2022-03-04 19:34:09 -05:00
|
|
|
// Allowlist reindexing from the local node so we can test reindex-from-remote.
|
2022-03-08 11:35:36 -05:00
|
|
|
setting 'reindex.remote.allowlist', '127.0.0.1:*'
|
2016-05-19 12:40:22 -04:00
|
|
|
}
|
|
|
|
|
2019-04-09 14:52:50 -04:00
|
|
|
test {
|
2017-10-25 22:05:46 -04:00
|
|
|
/*
|
|
|
|
* We have to disable setting the number of available processors as tests in the
|
|
|
|
* same JVM randomize processors and will step on each other if we allow them to
|
|
|
|
* set the number of available processors as it's set-once in Netty.
|
|
|
|
*/
|
2021-03-18 16:19:22 -04:00
|
|
|
systemProperty 'opensearch.set.netty.runtime.available.processors', 'false'
|
2017-10-25 22:05:46 -04:00
|
|
|
}
|
|
|
|
|
2016-05-19 12:40:22 -04:00
|
|
|
dependencies {
|
2020-06-30 09:57:41 -04:00
|
|
|
api project(":client:rest")
|
2021-03-09 18:57:16 -05:00
|
|
|
api project(":libs:opensearch-ssl-config")
|
2016-07-12 05:08:59 -04:00
|
|
|
// for http - testing reindex from remote
|
2020-06-30 09:57:41 -04:00
|
|
|
testImplementation project(':modules:transport-netty4')
|
2017-05-12 09:58:06 -04:00
|
|
|
// for parent/child testing
|
2020-06-30 09:57:41 -04:00
|
|
|
testImplementation project(':modules:parent-join')
|
2016-05-19 12:40:22 -04:00
|
|
|
}
|
|
|
|
|
2020-03-19 13:28:59 -04:00
|
|
|
restResources {
|
|
|
|
restApi {
|
2020-04-13 11:53:35 -04:00
|
|
|
includeCore '_common', 'cluster', 'nodes', 'indices', 'index', 'get', 'search', 'mget', 'count',
|
|
|
|
'update_by_query', 'delete_by_query', 'reindex_rethrottle', 'tasks', 'reindex', 'put_script'
|
2020-03-19 13:28:59 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-14 06:01:23 -05:00
|
|
|
thirdPartyAudit.ignoreMissingClasses(
|
2016-05-19 12:40:22 -04:00
|
|
|
// Commons logging
|
|
|
|
'javax.servlet.ServletContextEvent',
|
|
|
|
'javax.servlet.ServletContextListener',
|
2017-08-25 15:13:12 -04:00
|
|
|
'org.apache.avalon.framework.logger.Logger',
|
|
|
|
'org.apache.log.Hierarchy',
|
|
|
|
'org.apache.log.Logger',
|
2019-01-07 10:24:19 -05:00
|
|
|
)
|
2018-04-27 14:04:37 -04:00
|
|
|
|
2019-01-31 02:06:05 -05:00
|
|
|
forbiddenPatterns {
|
2019-11-14 06:01:23 -05:00
|
|
|
// PKCS#12 file are not UTF-8
|
|
|
|
exclude '**/*.p12'
|
2019-01-31 02:06:05 -05:00
|
|
|
}
|
|
|
|
|
2021-11-29 14:34:06 -05:00
|
|
|
tasks.named("bundlePlugin").configure {
|
|
|
|
dependsOn("copyParentJoinMetadata")
|
|
|
|
dependsOn("copyTransportNetty4Metadata")
|
|
|
|
}
|