Skip to content

Commit 331408a

Browse files
committed
apply feedback
1 parent ae0f3b6 commit 331408a

File tree

4 files changed

+26
-35
lines changed

4 files changed

+26
-35
lines changed

plugins/repository-s3/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,12 @@ processTestResources {
214214
MavenFilteringHack.filter(it, expansions)
215215
}
216216

217-
testFixtures.useFixture(':test:fixtures:s3-fixture')
217+
[
218+
's3-fixture',
219+
's3-fixture-with-session-token',
220+
's3-fixture-with-ec2',
221+
's3-fixture-with-ecs',
222+
].forEach { fixture -> testFixtures.useFixture(':test:fixtures:s3-fixture', fixture) }
218223

219224
def fixtureAddress = { fixture ->
220225
assert useFixture: 'closure should not be used without a fixture'

test/fixtures/s3-fixture/docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@ services:
1515
ports:
1616
- "80"
1717

18+
s3-fixture-other:
19+
build:
20+
context: .
21+
args:
22+
fixtureClass: fixture.s3.S3HttpFixture
23+
port: 80
24+
bucket: "bucket"
25+
basePath: "base_path"
26+
accessKey: "access_key"
27+
dockerfile: Dockerfile
28+
volumes:
29+
- ./testfixtures_shared/shared:/fixture/shared
30+
ports:
31+
- "80"
32+
1833
s3-fixture-with-session-token:
1934
build:
2035
context: .

x-pack/plugin/searchable-snapshots/qa/s3/build.gradle

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE
44

55
apply plugin: 'elasticsearch.standalone-rest-test'
66
apply plugin: 'elasticsearch.rest-test'
7-
apply plugin: 'elasticsearch.test.fixtures'
87

98
final Project fixture = project(':test:fixtures:s3-fixture')
109
final Project repositoryPlugin = project(':plugins:repository-s3')
@@ -33,27 +32,15 @@ if (!s3AccessKey && !s3SecretKey && !s3Bucket && !s3BasePath) {
3332
}
3433

3534
if (useFixture) {
36-
preProcessFixture {
37-
dependsOn fixture.jar
38-
doLast {
39-
file("${testFixturesDir}/shared").mkdirs()
40-
project.copy {
41-
from fixture.jar
42-
from fixture.configurations.runtimeClasspath
43-
from fixture.projectDir.toPath().resolve("Dockerfile")
44-
into "${testFixturesDir}/shared"
45-
}
46-
}
47-
}
48-
49-
testFixtures.useFixture()
35+
apply plugin: 'elasticsearch.test.fixtures'
36+
testFixtures.useFixture(fixture.path, 's3-fixture-other')
5037
}
5138

5239
integTest {
5340
dependsOn repositoryPlugin.bundlePlugin
5441
runner {
5542
systemProperty 'test.s3.bucket', s3Bucket
56-
systemProperty 'test.s3.base_path', s3BasePath + "_searchable_snapshots_tests"
43+
systemProperty 'test.s3.base_path', s3BasePath + "/searchable_snapshots_tests"
5744
}
5845
}
5946

@@ -67,13 +54,13 @@ testClusters.integTest {
6754
if (useFixture) {
6855
def fixtureAddress = { fixtureName ->
6956
assert useFixture: 'closure should not be used without a fixture'
70-
int ephemeralPort = postProcessFixture.ext."test.fixtures.${fixtureName}.tcp.80"
57+
int ephemeralPort = fixture.postProcessFixture.ext."test.fixtures.${fixtureName}.tcp.80"
7158
assert ephemeralPort > 0
7259
'127.0.0.1:' + ephemeralPort
7360
}
7461

7562
setting 's3.client.searchable_snapshots.protocol', 'http'
76-
setting 's3.client.searchable_snapshots.endpoint', { "${-> fixtureAddress('s3-fixture-for-searchable-snapshots')}" }, IGNORE_VALUE
63+
setting 's3.client.searchable_snapshots.endpoint', { "${-> fixtureAddress('s3-fixture-other')}" }, IGNORE_VALUE
7764
7865
} else {
7966
println "Using an external service to test " + project.name

x-pack/plugin/searchable-snapshots/qa/s3/docker-compose.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)