elasticsearch/qa/logging-config/build.gradle

37 lines
1.3 KiB
Groovy

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
apply plugin: 'elasticsearch.internal-testclusters'
apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
apply plugin: 'elasticsearch.standalone-test'
testClusters.all {
setting 'xpack.security.enabled', 'false'
}
testClusters.matching { it.name == "integTest" }.configureEach {
/**
* Provide a custom log4j configuration where layout is an old style pattern and confirm that Elasticsearch
* can successfully startup.
*/
extraConfigFile 'log4j2.properties', file('custom-log4j2.properties')
}
tasks.named("integTest").configure {
nonInputProperties.systemProperty 'tests.logfile',
"${-> testClusters.integTest.singleNode().getServerLog().absolutePath.replaceAll("_server.json", ".log")}"
nonInputProperties.systemProperty 'tests.jsonLogfile',
"${-> testClusters.integTest.singleNode().getServerLog()}"
}
tasks.named("test").configure {
systemProperty 'tests.security.manager', 'false'
}