OpenSearch/qa/evil-tests/build.gradle

81 lines
2.7 KiB
Groovy
Raw Normal View History

/*
* 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.
*/
Decentralize plugin security * Add ability for plugins to declare additional permissions with a custom plugin-security.policy file and corresponding AccessController logic. See the plugin author's guide for more information. * Add warning messages to users for extra plugin permissions in bin/plugin. * When bin/plugin is run interactively (stdin is a controlling terminal and -b/--batch not supplied), require user confirmation. * Improve unit test and IDE support for plugins with additional permissions by exposing plugin's metadata as a maven test resource. Closes #14108 Squashed commit of the following: commit cf8ace65a7397aaccd356bf55f95d6fbb8bb571c Author: Robert Muir <rmuir@apache.org> Date: Wed Oct 14 13:36:05 2015 -0400 fix new unit test from master merge commit 9be3c5aa38f2d9ae50f3d54924a30ad9cddeeb65 Merge: 2f168b8 7368231 Author: Robert Muir <rmuir@apache.org> Date: Wed Oct 14 12:58:31 2015 -0400 Merge branch 'master' into off_my_back commit 2f168b8038e32672f01ad0279fb5db77ba902ae8 Author: Robert Muir <rmuir@apache.org> Date: Wed Oct 14 12:56:04 2015 -0400 improve plugin author documentation commit 6e6c2bfda68a418d92733ac22a58eec35508b2d0 Author: Robert Muir <rmuir@apache.org> Date: Wed Oct 14 12:52:14 2015 -0400 move security confirmation after 'plugin already installed' check, to prevent user from answering unnecessary questions. commit 08233a2972554afef2a6a7521990283102e20d92 Author: Robert Muir <rmuir@apache.org> Date: Wed Oct 14 05:36:42 2015 -0400 Add documentation and pluginmanager support commit 05dad86c51488ba43ccbd749f0164f3fbd3aee62 Author: Robert Muir <rmuir@apache.org> Date: Wed Oct 14 02:22:24 2015 -0400 Decentralize plugin permissions (modulo docs and pluginmanager work)
2015-10-14 14:46:45 -04: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.
*/
2015-11-03 23:29:14 -05:00
/*
* Evil tests that need to do unrealistic things: test OS security
* integration, change default filesystem impl, mess with arbitrary
* threads, etc.
*/
import org.opensearch.gradle.info.BuildParams
2015-11-03 23:29:14 -05:00
Rename files under qa folder (#212) * Rename directory elasticsearch to opensearch Rename EvilElasticsearchCliTests EvilOpenSearchCliTests Signed-off-by: Harold Wang <harowang@amazon.com> * Rename org.elasticsearch to org.opensearch Signed-off-by: Harold Wang <harowang@amazon.com> * Rename waitForElasticsearch to waitForOpenSearch Signed-off-by: Harold Wang <harowang@amazon.com> * Rename OpensearchNode to OpenSearchNode Signed-off-by: Harold Wang <harowang@amazon.com> * Rename "elasticsearch.version" to "opensearch.version" Signed-off-by: Harold Wang <harowang@amazon.com> * Rename elasticsearchVersionString to opensearchVersionString Signed-off-by: Harold Wang <harowang@amazon.com> * Rename elasticsearch.yml to opensearch.yml Signed-off-by: Harold Wang <harowang@amazon.com> * Rename runElasticsearchTests to runOpenSearchTests Signed-off-by: Harold Wang <harowang@amazon.com> * Rename elasticsearchVersion to opensearchVersion Signed-off-by: Harold Wang <harowang@amazon.com> * Rename elasticsearch to opensearch in gradle files Signed-off-by: Harold Wang <harowang@amazon.com> * Rename ElasticsearchAssertions to OpenSearchAssertions Signed-off-by: Harold Wang <harowang@amazon.com> * Rename folder share/elasticsearch to share/opensearch Signed-off-by: Harold Wang <harowang@amazon.com> * Rename elasticsearch to opensearch Signed-off-by: Harold Wang <harowang@amazon.com> * Rename elasticsearch-service-x64 to opensearch-service-x64 Signed-off-by: Harold Wang <harowang@amazon.com> * Rename elasticsearch-service.bat to opensearch-service.bat Signed-off-by: Harold Wang <harowang@amazon.com> * Rename Elasticsearch to Opensearch Rename elasticsearch to opensearch Signed-off-by: Harold Wang <harowang@amazon.com> * Rename ELASTIC_PASSWORD_FILE to OPENSEARCH_PASSWORD_FILE Signed-off-by: Harold Wang <harowang@amazon.com> * Rename ELASTICSEARCH_PASSWORD to OPENSEARCH_PASSWORD Rename elasticsearch to opensearch Signed-off-by: Harold Wang <harowang@amazon.com> * Rename elasticsearch to opensearch Signed-off-by: Harold Wang <harowang@amazon.com> * Rename elasticsearch.log to opensearch.log Signed-off-by: Harold Wang <harowang@amazon.com> * Rename es-repo to opensearch-repo Signed-off-by: Harold Wang <harowang@amazon.com> * Rename ESTestCase to OpenSearchTestCase Signed-off-by: Harold Wang <harowang@amazon.com> * Rename ESRestTestCase to OpenSearchRestTestCase Signed-off-by: Harold Wang <harowang@amazon.com> * Rename elasticsearch to opensearch Rename "Starts ElasticSearch" to "Starts OpenSearch" Signed-off-by: Harold Wang <harowang@amazon.com> * Rename ESElasticsearchCliTestCase to BaseOpenSearchCliTestCase Signed-off-by: Harold Wang <harowang@amazon.com> * Rename "elasticsearch:test" to "opensearch:test" Signed-off-by: Harold Wang <harowang@amazon.com> * Rename test91ElasticsearchShardCliPackaging to test91OpenSearchShardCliPackaging Signed-off-by: Harold Wang <harowang@amazon.com> * Rename elasticsearch.toString to opensearch.toString Signed-off-by: Harold Wang <harowang@amazon.com> * Rename elasticsearch.pid to opensearch.pid Signed-off-by: Harold Wang <harowang@amazon.com> * Rename "Opensearch" to "OpenSearch" Rename "elasticsearch" to "opensearch" Signed-off-by: Harold Wang <harowang@amazon.com> * Rename Elasticsearch to OpenSearch Remove unecessary dot after opensearch. Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-08 13:06:46 -05:00
apply plugin: 'opensearch.testclusters'
apply plugin: 'opensearch.standalone-test'
2015-11-03 23:29:14 -05:00
dependencies {
testImplementation 'com.google.jimfs:jimfs:1.2'
2015-11-03 23:29:14 -05:00
}
// TODO: give each evil test its own fresh JVM for more isolation.
test {
systemProperty 'tests.security.manager', 'false'
}
thirdPartyAudit {
ignoreMissingClasses(
'com.ibm.icu.lang.UCharacter'
)
ignoreViolations(
// uses internal java api: sun.misc.Unsafe
'com.google.common.cache.Striped64',
'com.google.common.cache.Striped64$1',
'com.google.common.cache.Striped64$Cell',
'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray',
'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$1',
'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$2',
'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$3',
'com.google.common.hash.Striped64',
'com.google.common.hash.Striped64$1',
'com.google.common.hash.Striped64$Cell',
'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator',
'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1',
'com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper',
'com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper$1'
)
}
tasks.test {
if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_1_8) {
jvmArgs += ["--add-opens", "java.base/java.lang=ALL-UNNAMED"]
}
}