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 678179d55d0 Enable ppc64le support for hashicorp-vault tests with
dynamic container image selection (#16688)
678179d55d0 is described below
commit 678179d55d067e5ec6cd7e4ef3ff15efb9bffadc
Author: anushkajuli <[email protected]>
AuthorDate: Thu Jan 2 21:41:27 2025 +0530
Enable ppc64le support for hashicorp-vault tests with dynamic container
image selection (#16688)
Co-authored-by: anushkajuli <[email protected]>
---
components/camel-hashicorp-vault/pom.xml | 25 ----------------------
.../vault/common/HashicorpVaultProperties.java | 1 +
.../HashicorpVaultLocalContainerService.java | 11 +++++++++-
.../hashicorp/vault/services/container.properties | 1 +
4 files changed, 12 insertions(+), 26 deletions(-)
diff --git a/components/camel-hashicorp-vault/pom.xml
b/components/camel-hashicorp-vault/pom.xml
index 9f610a43f01..6fe3d006c07 100644
--- a/components/camel-hashicorp-vault/pom.xml
+++ b/components/camel-hashicorp-vault/pom.xml
@@ -64,29 +64,4 @@
</dependency>
</dependencies>
-<profiles>
- <profile>
- <id>ppc64le</id>
- <activation>
- <os>
- <arch>ppc64le</arch>
- </os>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <configuration>
- <skipITs>${skipTests}</skipITs>
- <reuseForks>true</reuseForks>
- <systemPropertyVariables>
-
<hashicorp.vault.container>icr.io/ppc64le-oss/vault-ppc64le:v1.13.1</hashicorp.vault.container>
- </systemPropertyVariables>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
diff --git
a/test-infra/camel-test-infra-hashicorp-vault/src/test/java/org/apache/camel/test/infra/hashicorp/vault/common/HashicorpVaultProperties.java
b/test-infra/camel-test-infra-hashicorp-vault/src/test/java/org/apache/camel/test/infra/hashicorp/vault/common/HashicorpVaultProperties.java
index 6e954df8c03..9810ac5cd5e 100644
---
a/test-infra/camel-test-infra-hashicorp-vault/src/test/java/org/apache/camel/test/infra/hashicorp/vault/common/HashicorpVaultProperties.java
+++
b/test-infra/camel-test-infra-hashicorp-vault/src/test/java/org/apache/camel/test/infra/hashicorp/vault/common/HashicorpVaultProperties.java
@@ -19,6 +19,7 @@ package org.apache.camel.test.infra.hashicorp.vault.common;
public final class HashicorpVaultProperties {
public static final String HASHICORP_VAULT_CONTAINER =
"hashicorp.vault.container";
+ public static final String HASHICORP_VAULT_CONTAINER_PPC64LE =
"hashicorp.vault.container.ppc64le";
public static final String HASHICORP_VAULT_ADDRESS =
"hashicorp.vault.address";
public static final String HASHICORP_VAULT_HOST = "hashicorp.vault.host";
public static final String HASHICORP_VAULT_PORT = "hashicorp.vault.port";
diff --git
a/test-infra/camel-test-infra-hashicorp-vault/src/test/java/org/apache/camel/test/infra/hashicorp/vault/services/HashicorpVaultLocalContainerService.java
b/test-infra/camel-test-infra-hashicorp-vault/src/test/java/org/apache/camel/test/infra/hashicorp/vault/services/HashicorpVaultLocalContainerService.java
index 8c4753198df..4be9a28a802 100644
---
a/test-infra/camel-test-infra-hashicorp-vault/src/test/java/org/apache/camel/test/infra/hashicorp/vault/services/HashicorpVaultLocalContainerService.java
+++
b/test-infra/camel-test-infra-hashicorp-vault/src/test/java/org/apache/camel/test/infra/hashicorp/vault/services/HashicorpVaultLocalContainerService.java
@@ -43,6 +43,7 @@ import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.output.OutputFrame;
import org.testcontainers.containers.output.Slf4jLogConsumer;
import org.testcontainers.containers.wait.strategy.Wait;
+import org.testcontainers.shaded.org.apache.commons.lang3.SystemUtils;
public class HashicorpVaultLocalContainerService implements
HashicorpVaultService, ContainerService<GenericContainer<?>> {
public static final String CONTAINER_NAME = "hashicorp-vault";
@@ -55,7 +56,15 @@ public class HashicorpVaultLocalContainerService implements
HashicorpVaultServic
public HashicorpVaultLocalContainerService() {
this(LocalPropertyResolver.getProperty(
HashicorpVaultLocalContainerService.class,
- HashicorpVaultProperties.HASHICORP_VAULT_CONTAINER));
+ getPropertyKeyForContainerImage()));
+ }
+
+ private static String getPropertyKeyForContainerImage() {
+ if ("ppc64le".equals(SystemUtils.OS_ARCH)) {
+ return HashicorpVaultProperties.HASHICORP_VAULT_CONTAINER_PPC64LE;
+ } else {
+ return HashicorpVaultProperties.HASHICORP_VAULT_CONTAINER;
+ }
}
public HashicorpVaultLocalContainerService(String containerImage) {
diff --git
a/test-infra/camel-test-infra-hashicorp-vault/src/test/resources/org/apache/camel/test/infra/hashicorp/vault/services/container.properties
b/test-infra/camel-test-infra-hashicorp-vault/src/test/resources/org/apache/camel/test/infra/hashicorp/vault/services/container.properties
index a66e9ca88e1..557ce422617 100644
---
a/test-infra/camel-test-infra-hashicorp-vault/src/test/resources/org/apache/camel/test/infra/hashicorp/vault/services/container.properties
+++
b/test-infra/camel-test-infra-hashicorp-vault/src/test/resources/org/apache/camel/test/infra/hashicorp/vault/services/container.properties
@@ -15,3 +15,4 @@
## limitations under the License.
## ---------------------------------------------------------------------------
hashicorp.vault.container=hashicorp/vault:1.17.5
+hashicorp.vault.container.ppc64le=icr.io/ppc64le-oss/vault-ppc64le:v1.13.1