/*
 * 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'
  setting 'xpack.security.enabled', 'false'
  setting 'xpack.license.self_generated.type', 'trial'
}

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

tasks.named('javaRestTestTestingConventions').configure {
  baseClass "org.elasticsearch.xpack.ml.integration.InferenceTestCase"
  baseClass "org.elasticsearch.test.rest.ESRestTestCase"
}
