/*
 * 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; you may not use this file except in compliance with the Elastic License
 * 2.0.
 */

apply plugin: 'elasticsearch.legacy-java-rest-test'

dependencies {
  javaRestTestImplementation(project(':modules:lang-mustache'))
}

testClusters.configureEach {
  testDistribution = 'DEFAULT'
  numberOfNodes = 3
  setting 'xpack.security.enabled', 'false'
  setting 'xpack.monitoring.elasticsearch.collection.enabled', 'false'
  setting 'xpack.watcher.enabled', 'false'
  setting 'xpack.ml.enabled', 'true'
  setting 'xpack.license.self_generated.type', 'trial'
  setting 'indices.lifecycle.history_index_enabled', 'false'
  setting 'slm.history_index_enabled', 'false'
}

if (buildParams.inFipsJvm){
  // Test clusters run with security disabled
  tasks.named("javaRestTest").configure{enabled = false }
}
