/*
 * 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.base-internal-es-plugin'
apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.legacy-yaml-rest-test'
apply plugin: 'elasticsearch.legacy-yaml-rest-compat-test'

esplugin {
  name = 'x-pack-test-deprecated-query'
  description = 'Deprecated query plugin'
  classname ='org.elasticsearch.query.DeprecatedQueryPlugin'
}

dependencies {
  clusterPlugins project(xpackModule('async-search'))
}

restResources {
  restApi {
    include '_common', 'indices', 'index', 'async_search'
  }
}

testClusters.configureEach {
  testDistribution = 'DEFAULT'
  setting 'xpack.security.enabled', 'false'
}

// Test clusters run with security disabled
tasks.named("yamlRestTest") {
  buildParams.withFipsEnabledOnly(it)
}
