Skip to content

Commit

Permalink
Bind
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Kurait <[email protected]>
  • Loading branch information
AndreKurait committed Dec 11, 2024
1 parent c3ac77b commit b4b65a0
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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);

Expand Down

0 comments on commit b4b65a0

Please sign in to comment.