From b4b65a0f4dfd0222e7ec9b7d43783054de2e4053 Mon Sep 17 00:00:00 2001 From: Andre Kurait Date: Wed, 11 Dec 2024 11:25:00 -0600 Subject: [PATCH] Bind Signed-off-by: Andre Kurait --- .../MultiTypeMappingTransformationTest.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/MetadataMigration/src/test/java/org/opensearch/migrations/MultiTypeMappingTransformationTest.java b/MetadataMigration/src/test/java/org/opensearch/migrations/MultiTypeMappingTransformationTest.java index a5249c5ac..5f3a301f5 100644 --- a/MetadataMigration/src/test/java/org/opensearch/migrations/MultiTypeMappingTransformationTest.java +++ b/MetadataMigration/src/test/java/org/opensearch/migrations/MultiTypeMappingTransformationTest.java @@ -34,15 +34,13 @@ class MultiTypeMappingTransformationTest extends BaseMigrationTest { @SneakyThrows @Test public void multiTypeTransformationTest_union() { + log.atWarn().setMessage("Using temp dir {}") + .addArgument(this.localDirectory.toAbsolutePath().toString()) + .log(); try ( - final var volumeContainer = new GenericContainer<>("alpine:latest") - .withFileSystemBind(localDirectory.toAbsolutePath().toString(), SearchClusterContainer.CLUSTER_SNAPSHOT_DIR, BindMode.READ_WRITE); - ) { - volumeContainer.start(); - final var indexCreatedCluster = new SearchClusterContainer(SearchClusterContainer.ES_V5_6_16) - .withVolumesFrom(volumeContainer, BindMode.READ_WRITE); - + .withFileSystemBind(this.localDirectory.toAbsolutePath().toString(), SearchClusterContainer.CLUSTER_SNAPSHOT_DIR, BindMode.READ_WRITE); + ) { indexCreatedCluster.start(); var indexCreatedOperations = new ClusterOperations(indexCreatedCluster.getUrl()); @@ -60,10 +58,10 @@ public void multiTypeTransformationTest_union() { indexCreatedOperations.createSnapshotRepository(SearchClusterContainer.CLUSTER_SNAPSHOT_DIR, es5Repo); indexCreatedOperations.takeSnapshot(es5Repo, snapshotName, originalIndexName); -// indexCreatedCluster.copySnapshotData(localDirectory.getAbsolutePath()); + indexCreatedCluster.copySnapshotData(localDirectory.toAbsolutePath().toString()); final var upgradedSourceCluster = new SearchClusterContainer(ES_V6_8_23) - .withVolumesFrom(volumeContainer, BindMode.READ_WRITE) + .withFileSystemBind(localDirectory.toAbsolutePath().toString(), SearchClusterContainer.CLUSTER_SNAPSHOT_DIR, BindMode.READ_WRITE) .withLogConsumer(new Slf4jLogConsumer(LoggerFactory.getLogger("docker"))); final var targetCluster = new SearchClusterContainer(SearchClusterContainer.OS_V2_14_0);