Skip to content

Commit 94c1ebe

Browse files
committed
[Test] Reactive 3rd party tests on CI (#31919)
3rd party tests are failing because the repository-s3 is expecting some enviromnent variables in order to test session tokens but the CI job is not ready yet to provide those. This pull request relaxes the constraints on the presence of env vars so that the 3rd party tests can still be executed on CI. closes #31813
1 parent a071672 commit 94c1ebe

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

plugins/repository-s3/build.gradle

+16-6
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

0 commit comments

Comments
 (0)