mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-23 05:15:04 +00:00
* Resolving the todo to clean this hackyness up
This commit is contained in:
parent
c8b66c549d
commit
65fcaecce1
@ -167,8 +167,6 @@ if (useFixture) {
|
||||
'http://127.0.0.1:' + minioPort
|
||||
}
|
||||
|
||||
File minioAddressFile = new File(project.buildDir, 'generated-resources/s3Fixture.address')
|
||||
|
||||
normalization {
|
||||
runtimeClasspath {
|
||||
// ignore generated address file for the purposes of build avoidance
|
||||
@ -178,12 +176,7 @@ if (useFixture) {
|
||||
|
||||
thirdPartyTest {
|
||||
dependsOn tasks.bundlePlugin, tasks.postProcessFixture
|
||||
outputs.file(minioAddressFile)
|
||||
doFirst {
|
||||
file(minioAddressFile).text = "${ -> minioAddress.call() }"
|
||||
}
|
||||
// TODO: this could be a nonInputProperties.systemProperty so we don't need a file
|
||||
systemProperty 'test.s3.endpoint', minioAddressFile.name
|
||||
nonInputProperties.systemProperty 'test.s3.endpoint', "${ -> minioAddress.call() }"
|
||||
}
|
||||
|
||||
task integTestMinio(type: RestIntegTestTask) {
|
||||
|
@ -27,12 +27,10 @@ import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.repositories.AbstractThirdPartyRepositoryTestCase;
|
||||
import org.elasticsearch.repositories.blobstore.BlobStoreRepository;
|
||||
import org.elasticsearch.test.StreamsUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.hamcrest.Matchers.blankOrNullString;
|
||||
@ -63,13 +61,9 @@ public class S3RepositoryThirdPartyTests extends AbstractThirdPartyRepositoryTes
|
||||
Settings.Builder settings = Settings.builder()
|
||||
.put("bucket", System.getProperty("test.s3.bucket"))
|
||||
.put("base_path", System.getProperty("test.s3.base", "testpath"));
|
||||
final String endpointPath = System.getProperty("test.s3.endpoint");
|
||||
if (endpointPath != null) {
|
||||
try {
|
||||
settings = settings.put("endpoint", StreamsUtils.copyToStringFromClasspath("/" + endpointPath));
|
||||
} catch (IOException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
final String endpoint = System.getProperty("test.s3.endpoint");
|
||||
if (endpoint != null) {
|
||||
settings = settings.put("endpoint", endpoint);
|
||||
}
|
||||
AcknowledgedResponse putRepositoryResponse = client().admin().cluster().preparePutRepository("test-repo")
|
||||
.setType("s3")
|
||||
|
Loading…
x
Reference in New Issue
Block a user