mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
Ensure docker test fixture preProcess task is always executed (#78421)
This commit is contained in:
parent
59700a016d
commit
dfdbb758e1
7 changed files with 22 additions and 23 deletions
|
@ -77,7 +77,6 @@ public class TestFixturesPlugin implements Plugin<Project> {
|
|||
project.getPluginManager().apply(DockerComposePlugin.class);
|
||||
|
||||
TaskProvider<Task> preProcessFixture = project.getTasks().register("preProcessFixture", t -> {
|
||||
t.getOutputs().dir(testfixturesDir);
|
||||
t.doFirst(new Action<Task>() {
|
||||
@Override
|
||||
public void execute(Task task) {
|
||||
|
|
|
@ -186,12 +186,12 @@ tasks.named("preProcessFixture").configure {
|
|||
doLast {
|
||||
// tests expect to have an empty repo
|
||||
project.delete(
|
||||
"${buildDir}/repo",
|
||||
"${testFixturesDir}/repo",
|
||||
)
|
||||
createAndSetWritable(
|
||||
"${buildDir}/repo",
|
||||
"${buildDir}/logs/default-1",
|
||||
"${buildDir}/logs/default-2",
|
||||
"${testFixturesDir}/repo",
|
||||
"${testFixturesDir}/logs/default-1",
|
||||
"${testFixturesDir}/logs/default-2",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,10 +33,10 @@ services:
|
|||
- xpack.license.self_generated.type=trial
|
||||
- action.destructive_requires_name=false
|
||||
volumes:
|
||||
- ./build/repo:/tmp/es-repo
|
||||
- ./testfixtures_shared/repo:/tmp/es-repo
|
||||
- ./build/certs/testnode.pem:/usr/share/elasticsearch/config/testnode.pem
|
||||
- ./build/certs/testnode.crt:/usr/share/elasticsearch/config/testnode.crt
|
||||
- ./build/logs/default-1:/usr/share/elasticsearch/logs
|
||||
- ./testfixtures_shared/logs/default-1:/usr/share/elasticsearch/logs
|
||||
- ./docker-test-entrypoint.sh:/docker-test-entrypoint.sh
|
||||
ports:
|
||||
- "9200"
|
||||
|
@ -86,10 +86,10 @@ services:
|
|||
- xpack.license.self_generated.type=trial
|
||||
- action.destructive_requires_name=false
|
||||
volumes:
|
||||
- ./build/repo:/tmp/es-repo
|
||||
- ./testfixtures_shared/repo:/tmp/es-repo
|
||||
- ./build/certs/testnode.pem:/usr/share/elasticsearch/config/testnode.pem
|
||||
- ./build/certs/testnode.crt:/usr/share/elasticsearch/config/testnode.crt
|
||||
- ./build/logs/default-2:/usr/share/elasticsearch/logs
|
||||
- ./testfixtures_shared/logs/default-2:/usr/share/elasticsearch/logs
|
||||
- ./docker-test-entrypoint.sh:/docker-test-entrypoint.sh
|
||||
ports:
|
||||
- "9200"
|
||||
|
|
|
@ -49,16 +49,16 @@ tasks.named("preProcessFixture").configure {
|
|||
doLast {
|
||||
// tests expect to have an empty repo
|
||||
project.delete(
|
||||
"${buildDir}/repo",
|
||||
"${buildDir}/oss-repo"
|
||||
"${testFixturesDir}/repo",
|
||||
"${testFixturesDir}/oss-repo"
|
||||
)
|
||||
createAndSetWritable(
|
||||
"${buildDir}/repo",
|
||||
"${buildDir}/oss-repo",
|
||||
"${buildDir}/logs/default-1",
|
||||
"${buildDir}/logs/default-2",
|
||||
"${buildDir}/logs/oss-1",
|
||||
"${buildDir}/logs/oss-2"
|
||||
"${testFixturesDir}/repo",
|
||||
"${testFixturesDir}/oss-repo",
|
||||
"${testFixturesDir}/logs/default-1",
|
||||
"${testFixturesDir}/logs/default-2",
|
||||
"${testFixturesDir}/logs/oss-1",
|
||||
"${testFixturesDir}/logs/oss-2"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,10 +34,10 @@ services:
|
|||
- xpack.license.self_generated.type=trial
|
||||
- action.destructive_requires_name=false
|
||||
volumes:
|
||||
- ./build/repo:/tmp/es-repo
|
||||
- ./testfixtures_shared/repo:/tmp/es-repo
|
||||
- ./build/certs/testnode.pem:/usr/share/elasticsearch/config/testnode.pem
|
||||
- ./build/certs/testnode.crt:/usr/share/elasticsearch/config/testnode.crt
|
||||
- ./build/logs/default-1:/usr/share/elasticsearch/logs
|
||||
- ./testfixtures_shared/logs/default-1:/usr/share/elasticsearch/logs
|
||||
- ./docker-test-entrypoint.sh:/docker-test-entrypoint.sh
|
||||
ports:
|
||||
- "9200"
|
||||
|
@ -89,10 +89,10 @@ services:
|
|||
- xpack.license.self_generated.type=trial
|
||||
- action.destructive_requires_name=false
|
||||
volumes:
|
||||
- ./build/repo:/tmp/es-repo
|
||||
- ./testfixtures_shared/repo:/tmp/es-repo
|
||||
- ./build/certs/testnode.pem:/usr/share/elasticsearch/config/testnode.pem
|
||||
- ./build/certs/testnode.crt:/usr/share/elasticsearch/config/testnode.crt
|
||||
- ./build/logs/default-2:/usr/share/elasticsearch/logs
|
||||
- ./testfixtures_shared/logs/default-2:/usr/share/elasticsearch/logs
|
||||
- ./docker-test-entrypoint.sh:/docker-test-entrypoint.sh
|
||||
ports:
|
||||
- "9200"
|
||||
|
|
|
@ -27,7 +27,7 @@ elasticsearch_distributions {
|
|||
tasks.named("preProcessFixture").configure {
|
||||
dependsOn "copyKeystore", elasticsearch_distributions.docker
|
||||
doLast {
|
||||
File file = file("${buildDir}/logs/node1")
|
||||
File file = file("${testFixturesDir}/logs/node1")
|
||||
file.mkdirs()
|
||||
file.setWritable(true, false)
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ services:
|
|||
- xpack.security.authc.realms.oidc.c2id-jwt.claims.mail=email
|
||||
- xpack.security.authc.realms.oidc.c2id-jwt.claims.groups=groups
|
||||
volumes:
|
||||
- ./build/logs/node1:/usr/share/elasticsearch/logs
|
||||
- ./testfixtures_shared/logs/node1:/usr/share/elasticsearch/logs
|
||||
- ./build/certs/testnode.jks:/usr/share/elasticsearch/config/testnode.jks
|
||||
- ./docker-test-entrypoint.sh:/docker-test-entrypoint.sh
|
||||
- ./oidc/op-jwks.json:/usr/share/elasticsearch/config/op-jwks.json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue