@@ -78,58 +78,11 @@ esplugin.bundleSpec.from('config/repository-s3') {
7878 into ' config'
7979}
8080
81- def testRepositoryCreds = tasks. register(" testRepositoryCreds" , Test ) {
82- include ' **/RepositoryCredentialsTests.class'
83- systemProperty ' es.allow_insecure_settings' , ' true'
84- classpath = sourceSets. test. runtimeClasspath
85- testClassesDirs = sourceSets. test. output. classesDirs
86- }
87-
88- tasks. named(' test' ). configure {
89- // this is tested explicitly in separate test tasks
90- exclude ' **/RepositoryCredentialsTests.class'
91- }
92-
93- boolean useFixture = false
94- String s3PermanentAccessKey = System . getenv(" amazon_s3_access_key" )
95- String s3PermanentSecretKey = System . getenv(" amazon_s3_secret_key" )
96- String s3PermanentBucket = System . getenv(" amazon_s3_bucket" )
97- String s3PermanentBasePath = System . getenv(" amazon_s3_base_path" )
98-
99- // If all these variables are missing then we are testing against the internal fixture instead, which has the following credentials hard-coded in.
100-
101- if (! s3PermanentAccessKey && ! s3PermanentSecretKey && ! s3PermanentBucket && ! s3PermanentBasePath) {
102- useFixture = true
103- s3PermanentAccessKey = ' s3_test_access_key'
104- s3PermanentSecretKey = ' s3_test_secret_key'
105- s3PermanentBucket = ' bucket'
106- s3PermanentBasePath = ' base_path'
107- }
108-
10981tasks. named(" internalClusterTest" ). configure {
110- // this is tested explicitly in a separate test task
111- exclude ' **/S3RepositoryThirdPartyTests.class'
11282 // TODO: remove once https://github.com/elastic/elasticsearch/issues/101608 is fixed
11383 systemProperty ' es.insecure_network_trace_enabled' , ' true'
11484}
11585
116- // 3rd Party Tests, i.e. testing against a real S3 repository
117- tasks. register(" s3ThirdPartyTest" , Test ) {
118- SourceSetContainer sourceSets = project. getExtensions(). getByType(SourceSetContainer . class);
119- SourceSet internalTestSourceSet = sourceSets. getByName(InternalClusterTestPlugin . SOURCE_SET_NAME )
120- setTestClassesDirs(internalTestSourceSet. getOutput(). getClassesDirs())
121- setClasspath(internalTestSourceSet. getRuntimeClasspath())
122- include ' **/S3RepositoryThirdPartyTests.class'
123- systemProperty(" tests.use.fixture" , Boolean . toString(useFixture))
124- systemProperty ' test.s3.account' , s3PermanentAccessKey
125- systemProperty ' test.s3.key' , s3PermanentSecretKey
126- systemProperty ' test.s3.bucket' , s3PermanentBucket
127- nonInputProperties. systemProperty ' test.s3.base' , s3PermanentBasePath + " _third_party_tests_" + buildParams. testSeed
128-
129- // test container accesses ~/.testcontainers.properties read
130- systemProperty " tests.security.manager" , " false"
131- }
132-
13386tasks. named(" thirdPartyAudit" ). configure {
13487 ignoreMissingClasses(
13588 // classes are missing
@@ -152,9 +105,3 @@ tasks.named("thirdPartyAudit").configure {
152105 ' javax.activation.DataHandler'
153106 )
154107}
155-
156- tasks. named(" check" ). configure {
157- dependsOn(tasks. withType(Test ))
158- dependsOn(testRepositoryCreds)
159- }
160-
0 commit comments