66 * your election, the "Elastic License 2.0", the "GNU Affero General Public
77 * License v3.0 only", or the "Server Side Public License, v 1".
88 */
9- import org.apache.tools.ant.filters.ReplaceTokens
10- import org.elasticsearch.gradle.internal.test.InternalClusterTestPlugin
9+ org.elasticsearch.gradle.internal.test.rest.RestTestSuite
1110
1211apply plugin : ' elasticsearch.internal-yaml-rest-test'
1312apply plugin : ' elasticsearch.internal-cluster-test'
1413apply plugin : ' elasticsearch.internal-java-rest-test'
1514
1615esplugin {
1716 description = ' The S3 repository plugin adds S3 repositories'
18- classname = ' org.elasticsearch.repositories.s3.S3RepositoryPlugin'
17+ classname = ' org.elasticsearch.repositories.s3.S3RepositoryPlugin'
1918}
2019
2120dependencies {
@@ -39,31 +38,53 @@ dependencies {
3938 api ' javax.xml.bind:jaxb-api:2.2.2'
4039
4140 testImplementation project(' :test:fixtures:s3-fixture' )
41+ }
42+
43+ tasks. named(' check' ) {
44+ dependsOn tasks. withType(Test )
45+ }
46+
4247
43- internalClusterTestImplementation project(' :test:fixtures:minio-fixture' )
44- internalClusterTestRuntimeOnly " org.slf4j:slf4j-simple:${ versions.slf4j} "
45-
46- yamlRestTestImplementation project(' :modules:repository-s3' )
47- yamlRestTestImplementation project(' :test:fixtures:aws-fixture-utils' )
48- yamlRestTestImplementation project(' :test:fixtures:s3-fixture' )
49- yamlRestTestImplementation project(' :test:fixtures:testcontainer-utils' )
50- yamlRestTestImplementation project(' :test:framework' )
51- yamlRestTestRuntimeOnly " org.slf4j:slf4j-simple:${ versions.slf4j} "
52-
53- javaRestTestImplementation project(' :modules:repository-s3' )
54- javaRestTestImplementation project(' :test:fixtures:aws-fixture-utils' )
55- javaRestTestImplementation project(' :test:fixtures:aws-sts-fixture' )
56- javaRestTestImplementation project(' :test:fixtures:ec2-imds-fixture' )
57- javaRestTestImplementation project(' :test:fixtures:minio-fixture' )
58- javaRestTestImplementation project(' :test:fixtures:s3-fixture' )
59- javaRestTestImplementation project(' :test:fixtures:testcontainer-utils' )
60- javaRestTestImplementation project(' :test:framework' )
61- javaRestTestRuntimeOnly " org.slf4j:slf4j-simple:${ versions.slf4j} "
48+ testing {
49+ suites {
50+ internalClusterTest {
51+ dependencies {
52+ implementation project(' :test:fixtures:minio-fixture' )
53+ }
54+ }
55+ javaRestTest {
56+ dependencies {
57+ implementation project()
58+ implementation project(' :test:fixtures:aws-fixture-utils' )
59+ implementation project(' :test:fixtures:s3-fixture' )
60+ implementation project(' :test:fixtures:testcontainer-utils' )
61+ implementation project(' :test:fixtures:aws-sts-fixture' )
62+ implementation project(' :test:fixtures:ec2-imds-fixture' )
63+ implementation project(' :test:fixtures:minio-fixture' )
64+ implementation project(' :test:fixtures:testcontainer-utils' )
65+ }
66+ }
67+ yamlRestTest {
68+ dependencies {
69+ implementation project()
70+ implementation project(' :test:fixtures:aws-fixture-utils' )
71+ implementation project(' :test:fixtures:s3-fixture' )
72+ implementation project(' :test:fixtures:testcontainer-utils' )
73+ }
74+ }
75+ configureEach {
76+ dependencies {
77+ implementation project(' :test:framework' )
78+ implementation project(' :test:fixtures:s3-fixture' )
79+ runtimeOnly " org.slf4j:slf4j-simple:${ versions.slf4j} "
80+ }
81+ }
82+ }
6283}
6384
6485restResources {
6586 restApi {
66- include ' _common' , ' cluster' , ' nodes' , ' snapshot' ,' indices' , ' index' , ' bulk' , ' count'
87+ include ' _common' , ' cluster' , ' nodes' , ' snapshot' , ' indices' , ' index' , ' bulk' , ' count'
6788 }
6889}
6990
@@ -75,33 +96,36 @@ tasks.named("dependencyLicenses").configure {
7596}
7697
7798esplugin. bundleSpec. from(' config/repository-s3' ) {
78- into ' config'
99+ into ' config'
79100}
80101
81102tasks. named(" internalClusterTest" ). configure {
82103 // TODO: remove once https://github.com/elastic/elasticsearch/issues/101608 is fixed
83104 systemProperty ' es.insecure_network_trace_enabled' , ' true'
84105}
85106
107+
86108tasks. named(" thirdPartyAudit" ). configure {
87109 ignoreMissingClasses(
88- // classes are missing
89- ' javax.servlet.ServletContextEvent' ,
90- ' javax.servlet.ServletContextListener' ,
91- ' org.apache.avalon.framework.logger.Logger' ,
92- ' org.apache.log.Hierarchy' ,
93- ' org.apache.log.Logger' ,
94- ' javax.jms.Message' ,
95- // We don't use the kms dependency
96- ' com.amazonaws.services.kms.AWSKMS' ,
97- ' com.amazonaws.services.kms.AWSKMSClient' ,
98- ' com.amazonaws.services.kms.AWSKMSClientBuilder' ,
99- ' com.amazonaws.services.kms.model.DecryptRequest' ,
100- ' com.amazonaws.services.kms.model.DecryptResult' ,
101- ' com.amazonaws.services.kms.model.EncryptRequest' ,
102- ' com.amazonaws.services.kms.model.EncryptResult' ,
103- ' com.amazonaws.services.kms.model.GenerateDataKeyRequest' ,
104- ' com.amazonaws.services.kms.model.GenerateDataKeyResult' ,
105- ' javax.activation.DataHandler'
110+ // classes are missing
111+ ' javax.servlet.ServletContextEvent' ,
112+ ' javax.servlet.ServletContextListener' ,
113+ ' org.apache.avalon.framework.logger.Logger' ,
114+ ' org.apache.log.Hierarchy' ,
115+ ' org.apache.log.Logger' ,
116+ ' javax.jms.Message' ,
117+ // We don't use the kms dependency
118+ ' com.amazonaws.services.kms.AWSKMS' ,
119+ ' com.amazonaws.services.kms.AWSKMSClient' ,
120+ ' com.amazonaws.services.kms.AWSKMSClientBuilder' ,
121+ ' com.amazonaws.services.kms.model.DecryptRequest' ,
122+ ' com.amazonaws.services.kms.model.DecryptResult' ,
123+ ' com.amazonaws.services.kms.model.EncryptRequest' ,
124+ ' com.amazonaws.services.kms.model.EncryptResult' ,
125+ ' com.amazonaws.services.kms.model.GenerateDataKeyRequest' ,
126+ ' com.amazonaws.services.kms.model.GenerateDataKeyResult' ,
127+ ' javax.activation.DataHandler'
106128 )
107129}
130+
131+
0 commit comments