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

dependencies {
  yamlRestTestImplementation(testArtifact(project(xpackModule('core'))))
}

restResources {
  restApi {
    include '_common', 'autoscaling'
  }
}

testClusters.configureEach {
  testDistribution = 'DEFAULT'
  setting 'xpack.security.enabled', 'true'
  setting 'xpack.license.self_generated.type', 'trial'
  extraConfigFile 'roles.yml', file('autoscaling-roles.yml')
  user username: 'autoscaling-admin', password: 'autoscaling-admin-password', role: 'superuser'
  user username: 'autoscaling-user', password: 'autoscaling-user-password', role: 'autoscaling'
}
