Skip to content

Commit a15f4d2

Browse files
committed
[Test] Reactive 3rd party tests on CI
1 parent aedbfc6 commit a15f4d2

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

plugins/repository-s3/build.gradle

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,26 @@ String s3TemporaryBasePath = System.getenv("amazon_s3_base_path_temporary")
9292
// If all these variables are missing then we are testing against the internal fixture instead, which has the following
9393
// credentials hard-coded in.
9494

95-
if (!s3PermanentAccessKey && !s3PermanentSecretKey && !s3PermanentBucket && !s3PermanentBasePath
96-
&& !s3TemporaryAccessKey && !s3TemporarySecretKey && !s3TemporaryBucket && !s3TemporaryBasePath && !s3TemporarySessionToken) {
97-
95+
if (!s3PermanentAccessKey && !s3PermanentSecretKey && !s3PermanentBucket && !s3PermanentBasePath) {
9896
s3PermanentAccessKey = 's3_integration_test_permanent_access_key'
9997
s3PermanentSecretKey = 's3_integration_test_permanent_secret_key'
10098
s3PermanentBucket = 'permanent-bucket-test'
10199
s3PermanentBasePath = 'integration_test'
102100

101+
useFixture = true
102+
103+
} else if (!s3PermanentAccessKey || !s3PermanentSecretKey || !s3PermanentBucket || !s3PermanentBasePath) {
104+
throw new IllegalArgumentException("not all options specified to run against external S3 service")
105+
}
106+
107+
if (!s3TemporaryAccessKey && !s3TemporarySecretKey && !s3TemporaryBucket && !s3TemporaryBasePath && !s3TemporarySessionToken) {
103108
s3TemporaryAccessKey = 's3_integration_test_temporary_access_key'
104109
s3TemporarySecretKey = 's3_integration_test_temporary_secret_key'
105110
s3TemporaryBucket = 'temporary-bucket-test'
106111
s3TemporaryBasePath = 'integration_test'
107112
s3TemporarySessionToken = 's3_integration_test_temporary_session_token'
108113

109-
useFixture = true
110-
} else if (!s3PermanentAccessKey || !s3PermanentSecretKey || !s3PermanentBucket || !s3PermanentBasePath
111-
|| !s3TemporaryAccessKey || !s3TemporarySecretKey || !s3TemporaryBucket || !s3TemporaryBasePath || !s3TemporarySessionToken) {
114+
} else if (!s3TemporaryAccessKey || !s3TemporarySecretKey || !s3TemporaryBucket || !s3TemporaryBasePath || !s3TemporarySessionToken) {
112115
throw new IllegalArgumentException("not all options specified to run against external S3 service")
113116
}
114117

@@ -296,6 +299,13 @@ processTestResources {
296299
MavenFilteringHack.filter(it, expansions)
297300
}
298301

302+
project.afterEvaluate {
303+
if (useFixture == false) {
304+
// 30_repository_temporary_credentials is not ready for CI yet
305+
integTestRunner.systemProperty 'tests.rest.blacklist', 'repository_s3/30_repository_temporary_credentials/*'
306+
}
307+
}
308+
299309
integTestCluster {
300310
keystoreSetting 's3.client.integration_test_permanent.access_key', s3PermanentAccessKey
301311
keystoreSetting 's3.client.integration_test_permanent.secret_key', s3PermanentSecretKey
@@ -311,6 +321,7 @@ integTestCluster {
311321
setting 's3.client.integration_test_temporary.endpoint', "http://${-> s3Fixture.addressAndPort}"
312322
} else {
313323
println "Using an external service to test the repository-s3 plugin"
324+
314325
}
315326
}
316327

0 commit comments

Comments
 (0)