This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 5e6faa2219e CAMEL-21334 - use specific ppc64le container image for
OpenSearch (#15923)
5e6faa2219e is described below
commit 5e6faa2219ec460c534442d9d5ef37583ebd197b
Author: Aurélien Pupier <[email protected]>
AuthorDate: Fri Oct 11 13:43:17 2024 +0200
CAMEL-21334 - use specific ppc64le container image for OpenSearch (#15923)
Integration tests
the ppc64le image is provided separately. The "official" OpenSearch
container does not support ppc64le
it will fix tests on main branch
Signed-off-by: Aurélien Pupier <[email protected]>
---
.../test/infra/opensearch/common/OpenSearchProperties.java | 1 +
.../opensearch/services/OpenSearchLocalContainerService.java | 11 ++++++++++-
.../camel/test/infra/opensearch/services/container.properties | 1 +
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git
a/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/common/OpenSearchProperties.java
b/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/common/OpenSearchProperties.java
index 03bca15e2ad..6e2fb94e56a 100644
---
a/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/common/OpenSearchProperties.java
+++
b/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/common/OpenSearchProperties.java
@@ -25,6 +25,7 @@ public final class OpenSearchProperties {
public static final String OPEN_SEARCH_USERNAME = "opensearch.username";
public static final String OPEN_SEARCH_PASSWORD = "opensearch.password";
public static final String OPEN_SEARCH_CONTAINER = "opensearch.container";
+ public static final String OPEN_SEARCH_CONTAINER_PPC64LE =
"opensearch.container.ppc64le";
public static final String OPEN_SEARCH_CONTAINER_STARTUP
= OPEN_SEARCH_CONTAINER +
ContainerEnvironmentUtil.STARTUP_ATTEMPTS_PROPERTY;
diff --git
a/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/services/OpenSearchLocalContainerService.java
b/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/services/OpenSearchLocalContainerService.java
index 69409d69cfd..8d136074e2e 100644
---
a/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/services/OpenSearchLocalContainerService.java
+++
b/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/services/OpenSearchLocalContainerService.java
@@ -28,6 +28,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.containers.output.Slf4jLogConsumer;
import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy;
+import org.testcontainers.shaded.org.apache.commons.lang3.SystemUtils;
import org.testcontainers.utility.DockerImageName;
public class OpenSearchLocalContainerService implements OpenSearchService,
ContainerService<OpensearchContainer> {
@@ -39,7 +40,15 @@ public class OpenSearchLocalContainerService implements
OpenSearchService, Conta
public OpenSearchLocalContainerService() {
this(LocalPropertyResolver.getProperty(OpenSearchLocalContainerService.class,
- OpenSearchProperties.OPEN_SEARCH_CONTAINER));
+ getPropertyKeyForContainerImage()));
+ }
+
+ private static String getPropertyKeyForContainerImage() {
+ if (SystemUtils.OS_ARCH == "ppc64le") {
+ return OpenSearchProperties.OPEN_SEARCH_CONTAINER_PPC64LE;
+ } else {
+ return OpenSearchProperties.OPEN_SEARCH_CONTAINER;
+ }
}
public OpenSearchLocalContainerService(String imageName) {
diff --git
a/test-infra/camel-test-infra-opensearch/src/test/resources/org/apache/camel/test/infra/opensearch/services/container.properties
b/test-infra/camel-test-infra-opensearch/src/test/resources/org/apache/camel/test/infra/opensearch/services/container.properties
index 1ad5a3829aa..00026c7d689 100644
---
a/test-infra/camel-test-infra-opensearch/src/test/resources/org/apache/camel/test/infra/opensearch/services/container.properties
+++
b/test-infra/camel-test-infra-opensearch/src/test/resources/org/apache/camel/test/infra/opensearch/services/container.properties
@@ -15,3 +15,4 @@
## limitations under the License.
## ---------------------------------------------------------------------------
opensearch.container=opensearchproject/opensearch:2.14.0
+opensearch.container.ppc64le=icr.io/ppc64le-oss/opensearch-ppc64le:2.12.0