Skip to content

Commit 4da99d6

Browse files
Fix Snapshot Cleanup Tool Base Path on S3 (#71173) (#71190)
We were not randomizing these paths for the cleanup tool like we do for the s3 plugin and repo test kit tests. This commit aligns the behavior with the other two s3 third party tests to avoid collisions on CI. Closes #70941
1 parent f320845 commit 4da99d6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

x-pack/snapshot-tool/qa/google-cloud-storage/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if (!gcsServiceAccount && !gcsBucket && !gcsBasePath) {
3131
gcsServiceAccount = new File(project(':plugins:repository-gcs').buildDir,
3232
'generated-resources/service_account_test.json').path
3333
gcsBucket = 'bucket_test'
34-
gcsBasePath = 'integration_test'
34+
gcsBasePath = null
3535

3636
useGCSFixture = true
3737
} else if (!gcsServiceAccount || !gcsBucket || !gcsBasePath) {
@@ -48,7 +48,7 @@ task gcsThirdPartyTest(type: Test) {
4848
systemProperty 'tests.security.manager', false
4949

5050
systemProperty 'test.google.bucket', gcsBucket
51-
systemProperty 'test.google.base', gcsBasePath
51+
nonInputProperties.systemProperty 'test.google.base', gcsBasePath ? gcsBasePath + "_snapshot_tool_tests" + BuildParams.testSeed : 'base_path'
5252
nonInputProperties.systemProperty 'test.google.account', "${-> encodedCredentials.call()}"
5353
}
5454

x-pack/snapshot-tool/qa/s3/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* 2.0; you may not use this file except in compliance with the Elastic License
55
* 2.0.
66
*/
7+
import org.elasticsearch.gradle.info.BuildParams
8+
79
apply plugin: 'elasticsearch.build'
810

911
dependencies {
@@ -26,7 +28,7 @@ if (!s3PermanentAccessKey && !s3PermanentSecretKey && !s3PermanentBucket && !s3P
2628
s3PermanentAccessKey = 'sn_tool_access_key'
2729
s3PermanentSecretKey = 'sn_tool_secret_key'
2830
s3PermanentBucket = 'bucket'
29-
s3PermanentBasePath = 'integration_test'
31+
s3PermanentBasePath = null
3032

3133
useS3Fixture = true
3234
} else if (!s3PermanentAccessKey || !s3PermanentSecretKey || !s3PermanentBucket || !s3PermanentBasePath) {
@@ -41,7 +43,7 @@ task s3ThirdPartyTest(type: Test) {
4143
systemProperty 'test.s3.account', s3PermanentAccessKey
4244
systemProperty 'test.s3.key', s3PermanentSecretKey
4345
systemProperty 'test.s3.bucket', s3PermanentBucket
44-
systemProperty 'test.s3.base', s3PermanentBasePath
46+
nonInputProperties.systemProperty 'test.s3.base', s3PermanentBasePath ? s3PermanentBasePath + "_snapshot_tool_tests" + BuildParams.testSeed : 'base_path'
4547
}
4648

4749
if (useS3Fixture) {

0 commit comments

Comments
 (0)