|
@@ -92,11 +92,15 @@ String s3TemporaryBasePath = System.getenv("amazon_s3_base_path_temporary")
|
|
|
String s3EC2Bucket = System.getenv("amazon_s3_bucket_ec2")
|
|
|
String s3EC2BasePath = System.getenv("amazon_s3_base_path_ec2")
|
|
|
|
|
|
+String s3ECSBucket = System.getenv("amazon_s3_bucket_ecs")
|
|
|
+String s3ECSBasePath = System.getenv("amazon_s3_base_path_ecs")
|
|
|
+
|
|
|
// If all these variables are missing then we are testing against the internal fixture instead, which has the following
|
|
|
// credentials hard-coded in.
|
|
|
|
|
|
if (!s3PermanentAccessKey && !s3PermanentSecretKey && !s3PermanentBucket && !s3PermanentBasePath
|
|
|
- && !s3EC2Bucket && !s3EC2BasePath) {
|
|
|
+ && !s3EC2Bucket && !s3EC2BasePath
|
|
|
+ && !s3ECSBucket && !s3ECSBasePath) {
|
|
|
s3PermanentAccessKey = 's3_integration_test_permanent_access_key'
|
|
|
s3PermanentSecretKey = 's3_integration_test_permanent_secret_key'
|
|
|
s3PermanentBucket = 'permanent-bucket-test'
|
|
@@ -105,10 +109,14 @@ if (!s3PermanentAccessKey && !s3PermanentSecretKey && !s3PermanentBucket && !s3P
|
|
|
s3EC2Bucket = 'ec2-bucket-test'
|
|
|
s3EC2BasePath = 'integration_test'
|
|
|
|
|
|
+ s3ECSBucket = 'ecs-bucket-test'
|
|
|
+ s3ECSBasePath = 'integration_test'
|
|
|
+
|
|
|
useFixture = true
|
|
|
|
|
|
} else if (!s3PermanentAccessKey || !s3PermanentSecretKey || !s3PermanentBucket || !s3PermanentBasePath
|
|
|
- || !s3EC2Bucket || !s3EC2BasePath) {
|
|
|
+ || !s3EC2Bucket || !s3EC2BasePath
|
|
|
+ || !s3ECSBucket || !s3ECSBasePath) {
|
|
|
throw new IllegalArgumentException("not all options specified to run against external S3 service")
|
|
|
}
|
|
|
|
|
@@ -284,7 +292,8 @@ if (useFixture && minioDistribution) {
|
|
|
// Minio only supports a single access key, see https://github.com/minio/minio/pull/5968
|
|
|
integTestMinioRunner.systemProperty 'tests.rest.blacklist', [
|
|
|
'repository_s3/30_repository_temporary_credentials/*',
|
|
|
- 'repository_s3/40_repository_ec2_credentials/*'
|
|
|
+ 'repository_s3/40_repository_ec2_credentials/*',
|
|
|
+ 'repository_s3/50_repository_ecs_credentials/*'
|
|
|
].join(",")
|
|
|
|
|
|
project.check.dependsOn(integTestMinio)
|
|
@@ -302,7 +311,8 @@ task s3FixtureProperties {
|
|
|
"s3Fixture.temporary_bucket_name" : s3TemporaryBucket,
|
|
|
"s3Fixture.temporary_key" : s3TemporaryAccessKey,
|
|
|
"s3Fixture.temporary_session_token": s3TemporarySessionToken,
|
|
|
- "s3Fixture.ec2_bucket_name" : s3EC2Bucket
|
|
|
+ "s3Fixture.ec2_bucket_name" : s3EC2Bucket,
|
|
|
+ "s3Fixture.ecs_bucket_name" : s3ECSBucket
|
|
|
]
|
|
|
|
|
|
doLast {
|
|
@@ -327,7 +337,9 @@ Map<String, Object> expansions = [
|
|
|
'temporary_bucket': s3TemporaryBucket,
|
|
|
'temporary_base_path': s3TemporaryBasePath,
|
|
|
'ec2_bucket': s3EC2Bucket,
|
|
|
- 'ec2_base_path': s3EC2BasePath
|
|
|
+ 'ec2_base_path': s3EC2BasePath,
|
|
|
+ 'ecs_bucket': s3ECSBucket,
|
|
|
+ 'ecs_base_path': s3ECSBasePath
|
|
|
]
|
|
|
|
|
|
processTestResources {
|
|
@@ -364,6 +376,34 @@ integTestCluster {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+integTestRunner.systemProperty 'tests.rest.blacklist', 'repository_s3/50_repository_ecs_credentials/*'
|
|
|
+
|
|
|
+///
|
|
|
+RestIntegTestTask integTestECS = project.tasks.create('integTestECS', RestIntegTestTask.class) {
|
|
|
+ description = "Runs tests using the ECS repository."
|
|
|
+}
|
|
|
+
|
|
|
+// The following closure must execute before the afterEvaluate block in the constructor of the following integrationTest tasks:
|
|
|
+project.afterEvaluate {
|
|
|
+ ClusterConfiguration cluster = project.extensions.getByName('integTestECSCluster') as ClusterConfiguration
|
|
|
+ cluster.dependsOn(project.s3Fixture)
|
|
|
+
|
|
|
+ cluster.setting 's3.client.integration_test_ecs.endpoint', "http://${-> s3Fixture.addressAndPort}"
|
|
|
+
|
|
|
+ Task integTestECSTask = project.tasks.getByName('integTestECS')
|
|
|
+ integTestECSTask.clusterConfig.plugin(project.path)
|
|
|
+ integTestECSTask.clusterConfig.environment 'AWS_CONTAINER_CREDENTIALS_FULL_URI',
|
|
|
+ "http://${-> s3Fixture.addressAndPort}/ecs_credentials_endpoint"
|
|
|
+ integTestECSRunner.systemProperty 'tests.rest.blacklist', [
|
|
|
+ 'repository_s3/10_basic/*',
|
|
|
+ 'repository_s3/20_repository_permanent_credentials/*',
|
|
|
+ 'repository_s3/30_repository_temporary_credentials/*',
|
|
|
+ 'repository_s3/40_repository_ec2_credentials/*'
|
|
|
+ ].join(",")
|
|
|
+}
|
|
|
+project.check.dependsOn(integTestECS)
|
|
|
+///
|
|
|
+
|
|
|
thirdPartyAudit.excludes = [
|
|
|
// classes are missing
|
|
|
'javax.servlet.ServletContextEvent',
|