/*
 * 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.test-with-ssl'

tasks.named("javaRestTest").configure {
  // Do not attempt to form a cluster in a FIPS JVM, as doing so with a JKS keystore will fail.
  // TODO Revisit this when SQL CLI client can handle key/certificate instead of only Keystores.
  // https://github.com/elastic/elasticsearch/issues/32306
  buildParams.withFipsEnabledOnly(it)
}

testClusters.matching { it.name == "javaRestTest" }.configureEach {
  // The setup that we actually want
  setting 'xpack.license.self_generated.type', 'trial'
  setting 'xpack.security.http.ssl.enabled', 'true'
  setting 'xpack.security.transport.ssl.enabled', 'true'
}
