6
6
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7
7
* License v3.0 only", or the "Server Side Public License, v 1".
8
8
*/
9
- import org.apache.tools.ant.filters.ReplaceTokens
10
- import org.elasticsearch.gradle.internal.test.InternalClusterTestPlugin
9
+ org.elasticsearch.gradle.internal.test.rest.RestTestSuite
11
10
12
11
apply plugin : ' elasticsearch.internal-yaml-rest-test'
13
12
apply plugin : ' elasticsearch.internal-cluster-test'
14
13
apply plugin : ' elasticsearch.internal-java-rest-test'
15
14
16
15
esplugin {
17
16
description = ' The S3 repository plugin adds S3 repositories'
18
- classname = ' org.elasticsearch.repositories.s3.S3RepositoryPlugin'
17
+ classname = ' org.elasticsearch.repositories.s3.S3RepositoryPlugin'
19
18
}
20
19
21
20
dependencies {
@@ -39,31 +38,53 @@ dependencies {
39
38
api ' javax.xml.bind:jaxb-api:2.2.2'
40
39
41
40
testImplementation project(' :test:fixtures:s3-fixture' )
41
+ }
42
+
43
+ tasks. named(' check' ) {
44
+ dependsOn tasks. withType(Test )
45
+ }
46
+
42
47
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
+ }
62
83
}
63
84
64
85
restResources {
65
86
restApi {
66
- include ' _common' , ' cluster' , ' nodes' , ' snapshot' ,' indices' , ' index' , ' bulk' , ' count'
87
+ include ' _common' , ' cluster' , ' nodes' , ' snapshot' , ' indices' , ' index' , ' bulk' , ' count'
67
88
}
68
89
}
69
90
@@ -75,33 +96,36 @@ tasks.named("dependencyLicenses").configure {
75
96
}
76
97
77
98
esplugin. bundleSpec. from(' config/repository-s3' ) {
78
- into ' config'
99
+ into ' config'
79
100
}
80
101
81
102
tasks. named(" internalClusterTest" ). configure {
82
103
// TODO: remove once https://github.com/elastic/elasticsearch/issues/101608 is fixed
83
104
systemProperty ' es.insecure_network_trace_enabled' , ' true'
84
105
}
85
106
107
+
86
108
tasks. named(" thirdPartyAudit" ). configure {
87
109
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'
106
128
)
107
129
}
130
+
131
+
0 commit comments