OpenSearch/qa/remote-clusters
Jake Landis 8d311297ca
[7.x] Smarter copying of the rest specs and tests (#52114) (#52798)
* Smarter copying of the rest specs and tests (#52114)

This PR addresses the unnecessary copying of the rest specs and allows
for better semantics for which specs and tests are copied. By default
the rest specs will get copied if the project applies
`elasticsearch.standalone-rest-test` or `esplugin` and the project
has rest tests or you configure the custom extension `restResources`.

This PR also removes the need for dozens of places where the x-pack
specs were copied by supporting copying of the x-pack rest specs too.

The plugin/task introduced here can also copy the rest tests to the
local project through a similar configuration.

The new plugin/task allows a user to minimize the surface area of
which rest specs are copied. Per project can be configured to include
only a subset of the specs (or tests). Configuring a project to only
copy the specs when actually needed should help with build cache hit
rates since we can better define what is actually in use.
However, project level optimizations for build cache hit rates are
not included with this PR.

Also, with this PR you can no longer use the includePackaged flag on
integTest task.

The following items are included in this PR:
* new plugin: `elasticsearch.rest-resources`
* new tasks: CopyRestApiTask and CopyRestTestsTask - performs the copy
* new extension 'restResources'
```
restResources {
  restApi {
    includeCore 'foo' , 'bar' //will include the core specs that start with foo and bar
    includeXpack 'baz' //will include x-pack specs that start with baz
  }
  restTests {
    includeCore 'foo', 'bar' //will include the core tests that start with foo and bar
    includeXpack 'baz' //will include the x-pack tests that start with baz
  }
}

```
2020-02-26 08:13:41 -06:00
..
src/test/java/org/elasticsearch/cluster/remote/test Add Docker-based tests for proxy connection mode (#51658) 2020-02-03 09:45:38 +01:00
build.gradle [7.x] Smarter copying of the rest specs and tests (#52114) (#52798) 2020-02-26 08:13:41 -06:00
docker-compose-oss.yml Add Docker-based tests for proxy connection mode (#51658) 2020-02-03 09:45:38 +01:00
docker-compose.yml Add Docker-based tests for proxy connection mode (#51658) 2020-02-03 09:45:38 +01:00
docker-test-entrypoint.sh Add Docker-based tests for proxy connection mode (#51658) 2020-02-03 09:45:38 +01:00
haproxy-default.cfg Add Docker-based tests for proxy connection mode (#51658) 2020-02-03 09:45:38 +01:00
haproxy-oss.cfg Add Docker-based tests for proxy connection mode (#51658) 2020-02-03 09:45:38 +01:00