2020-05-05 05:40:06 -04:00
|
|
|
import org.elasticsearch.gradle.info.BuildParams
|
|
|
|
import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE
|
|
|
|
|
|
|
|
apply plugin: 'elasticsearch.standalone-rest-test'
|
|
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
apply plugin: 'elasticsearch.test.fixtures'
|
2020-07-06 15:16:26 -04:00
|
|
|
apply plugin: 'elasticsearch.rest-resources'
|
2020-05-05 05:40:06 -04:00
|
|
|
|
|
|
|
final Project fixture = project(':test:fixtures:minio-fixture')
|
|
|
|
final Project repositoryPlugin = project(':plugins:repository-s3')
|
|
|
|
|
|
|
|
dependencies {
|
2020-06-14 16:30:44 -04:00
|
|
|
testImplementation project(path: xpackModule('searchable-snapshots'), configuration: 'testArtifacts')
|
|
|
|
testImplementation repositoryPlugin
|
2020-05-05 05:40:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
restResources {
|
|
|
|
restApi {
|
|
|
|
includeCore 'indices', 'search', 'bulk', 'snapshot', 'nodes', '_common'
|
|
|
|
includeXpack 'searchable_snapshots'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
testFixtures.useFixture(fixture.path, 'minio-fixture-other')
|
|
|
|
def fixtureAddress = {
|
|
|
|
int ephemeralPort = fixture.postProcessFixture.ext."test.fixtures.minio-fixture-other.tcp.9000"
|
|
|
|
assert ephemeralPort > 0
|
|
|
|
'127.0.0.1:' + ephemeralPort
|
|
|
|
}
|
|
|
|
|
|
|
|
integTest {
|
|
|
|
dependsOn repositoryPlugin.bundlePlugin
|
|
|
|
runner {
|
|
|
|
systemProperty 'test.minio.bucket', 'bucket'
|
|
|
|
systemProperty 'test.minio.base_path', 'searchable_snapshots_tests'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
testClusters.integTest {
|
|
|
|
testDistribution = 'DEFAULT'
|
|
|
|
plugin repositoryPlugin.bundlePlugin.archiveFile
|
|
|
|
|
|
|
|
if (BuildParams.isSnapshotBuild() == false) {
|
|
|
|
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
|
|
|
|
}
|
|
|
|
|
|
|
|
keystore 's3.client.searchable_snapshots.access_key', 'access_key'
|
|
|
|
keystore 's3.client.searchable_snapshots.secret_key', 'secret_key'
|
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
|
|
setting 's3.client.searchable_snapshots.protocol', 'http'
|
|
|
|
setting 's3.client.searchable_snapshots.endpoint', { "${-> fixtureAddress()}" }, IGNORE_VALUE
|
|
|
|
}
|
|
|
|
|