build.gradle 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
  3. * or more contributor license agreements. Licensed under the Elastic License
  4. * 2.0 and the Server Side Public License, v 1; you may not use this file except
  5. * in compliance with, at your election, the Elastic License 2.0 or the Server
  6. * Side Public License, v 1.
  7. */
  8. import org.elasticsearch.gradle.Version
  9. import org.elasticsearch.gradle.internal.info.BuildParams
  10. import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask
  11. apply plugin: 'elasticsearch.internal-java-rest-test'
  12. apply plugin: 'elasticsearch.bwc-test'
  13. dependencies {
  14. javaRestTestImplementation project(xpackModule('esql:qa:testFixtures'))
  15. javaRestTestImplementation project(xpackModule('esql:qa:server'))
  16. }
  17. def supportedVersion = bwcVersion -> {
  18. // ESQL requires its own resolve_fields API
  19. return bwcVersion.onOrAfter(Version.fromString("8.16.0"));
  20. }
  21. BuildParams.bwcVersions.withWireCompatible(supportedVersion) { bwcVersion, baseName ->
  22. tasks.register(bwcTaskName(bwcVersion), StandaloneRestIntegTestTask) {
  23. usesBwcDistribution(bwcVersion)
  24. systemProperty("tests.old_cluster_version", bwcVersion)
  25. maxParallelForks = 1
  26. }
  27. }