Skip to content

Commit a254716

Browse files
fixes broken build for third-party-tests (#32353)
fixes broken build repository-s3 for third-party-tests
1 parent 6aea829 commit a254716

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

plugins/repository-s3/build.gradle

+24-24
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ if (!s3PermanentAccessKey && !s3PermanentSecretKey && !s3PermanentBucket && !s3P
115115
useFixture = true
116116

117117
} else if (!s3PermanentAccessKey || !s3PermanentSecretKey || !s3PermanentBucket || !s3PermanentBasePath) {
118-
throw new IllegalArgumentException("not all options specified to run against external S3 service")
118+
throw new IllegalArgumentException("not all options specified to run against external S3 service as permanent credentials are present")
119119
}
120120

121121
if (!s3TemporaryAccessKey && !s3TemporarySecretKey && !s3TemporaryBucket && !s3TemporaryBasePath && !s3TemporarySessionToken) {
@@ -126,7 +126,7 @@ if (!s3TemporaryAccessKey && !s3TemporarySecretKey && !s3TemporaryBucket && !s3T
126126
s3TemporarySessionToken = 's3_integration_test_temporary_session_token'
127127

128128
} else if (!s3TemporaryAccessKey || !s3TemporarySecretKey || !s3TemporaryBucket || !s3TemporaryBasePath || !s3TemporarySessionToken) {
129-
throw new IllegalArgumentException("not all options specified to run against external S3 service")
129+
throw new IllegalArgumentException("not all options specified to run against external S3 service as temporary credentials are present")
130130
}
131131

132132
final String minioVersion = 'RELEASE.2018-06-22T23-48-46Z'
@@ -381,31 +381,31 @@ integTestCluster {
381381

382382
integTestRunner.systemProperty 'tests.rest.blacklist', 'repository_s3/50_repository_ecs_credentials/*'
383383

384-
///
385-
RestIntegTestTask integTestECS = project.tasks.create('integTestECS', RestIntegTestTask.class) {
386-
description = "Runs tests using the ECS repository."
387-
}
384+
if (useFixture) {
385+
RestIntegTestTask integTestECS = project.tasks.create('integTestECS', RestIntegTestTask.class) {
386+
description = "Runs tests using the ECS repository."
387+
}
388388

389389
// The following closure must execute before the afterEvaluate block in the constructor of the following integrationTest tasks:
390-
project.afterEvaluate {
391-
ClusterConfiguration cluster = project.extensions.getByName('integTestECSCluster') as ClusterConfiguration
392-
cluster.dependsOn(project.s3Fixture)
393-
394-
cluster.setting 's3.client.integration_test_ecs.endpoint', "http://${-> s3Fixture.addressAndPort}"
395-
396-
Task integTestECSTask = project.tasks.getByName('integTestECS')
397-
integTestECSTask.clusterConfig.plugin(project.path)
398-
integTestECSTask.clusterConfig.environment 'AWS_CONTAINER_CREDENTIALS_FULL_URI',
399-
"http://${-> s3Fixture.addressAndPort}/ecs_credentials_endpoint"
400-
integTestECSRunner.systemProperty 'tests.rest.blacklist', [
401-
'repository_s3/10_basic/*',
402-
'repository_s3/20_repository_permanent_credentials/*',
403-
'repository_s3/30_repository_temporary_credentials/*',
404-
'repository_s3/40_repository_ec2_credentials/*'
405-
].join(",")
390+
project.afterEvaluate {
391+
ClusterConfiguration cluster = project.extensions.getByName('integTestECSCluster') as ClusterConfiguration
392+
cluster.dependsOn(project.s3Fixture)
393+
394+
cluster.setting 's3.client.integration_test_ecs.endpoint', "http://${-> s3Fixture.addressAndPort}"
395+
396+
Task integTestECSTask = project.tasks.getByName('integTestECS')
397+
integTestECSTask.clusterConfig.plugin(project.path)
398+
integTestECSTask.clusterConfig.environment 'AWS_CONTAINER_CREDENTIALS_FULL_URI',
399+
"http://${-> s3Fixture.addressAndPort}/ecs_credentials_endpoint"
400+
integTestECSRunner.systemProperty 'tests.rest.blacklist', [
401+
'repository_s3/10_basic/*',
402+
'repository_s3/20_repository_permanent_credentials/*',
403+
'repository_s3/30_repository_temporary_credentials/*',
404+
'repository_s3/40_repository_ec2_credentials/*'
405+
].join(",")
406+
}
407+
project.check.dependsOn(integTestECS)
406408
}
407-
project.check.dependsOn(integTestECS)
408-
///
409409

410410
thirdPartyAudit.excludes = [
411411
// classes are missing

0 commit comments

Comments
 (0)