diff --git a/integration-tests/jms-ibmmq-client/src/test/java/org/apache/camel/quarkus/component/jms/ibmmq/support/IBMMQTestResource.java b/integration-tests/jms-ibmmq-client/src/test/java/org/apache/camel/quarkus/component/jms/ibmmq/support/IBMMQTestResource.java index 4327e000cf2b..c2565aea54c6 100644 --- a/integration-tests/jms-ibmmq-client/src/test/java/org/apache/camel/quarkus/component/jms/ibmmq/support/IBMMQTestResource.java +++ b/integration-tests/jms-ibmmq-client/src/test/java/org/apache/camel/quarkus/component/jms/ibmmq/support/IBMMQTestResource.java @@ -16,16 +16,13 @@ */ package org.apache.camel.quarkus.component.jms.ibmmq.support; -import java.io.File; -import java.io.IOException; -import java.nio.charset.Charset; import java.util.Map; import io.quarkus.test.common.QuarkusTestResourceLifecycleManager; -import org.apache.commons.io.FileUtils; import org.eclipse.microprofile.config.ConfigProvider; import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.wait.strategy.Wait; +import org.testcontainers.images.builder.Transferable; import org.testcontainers.utility.DockerImageName; public class IBMMQTestResource implements QuarkusTestResourceLifecycleManager { @@ -36,7 +33,6 @@ public class IBMMQTestResource implements QuarkusTestResourceLifecycleManager { private static final String PASSWORD = "passw0rd"; private static final String MESSAGING_CHANNEL = "DEV.APP.SVRCONN"; private static final String MQSC_COMMAND_FILE_NAME = "99-auth.mqsc"; - private static final String MQSC_FILE = "target/" + MQSC_COMMAND_FILE_NAME; private static final String MQSC_FILE_CONTAINER_PATH = "/etc/mqm/" + MQSC_COMMAND_FILE_NAME; private GenericContainer container; @@ -48,9 +44,10 @@ public Map start() { .withExposedPorts(PORT) .withEnv(Map.of( "LICENSE", System.getProperty("ibm.mq.container.license"), - "MQ_QMGR_NAME", QUEUE_MANAGER_NAME, - "MQ_APP_PASSWORD", PASSWORD)) - .withFileSystemBind(mqscConfig(), MQSC_FILE_CONTAINER_PATH) + "MQ_QMGR_NAME", QUEUE_MANAGER_NAME)) + .withCopyToContainer(Transferable.of(PASSWORD), "/run/secrets/mqAdminPassword") + .withCopyToContainer(Transferable.of(PASSWORD), "/run/secrets/mqAppPassword") + .withCopyToContainer(Transferable.of(mqscConfig()), MQSC_FILE_CONTAINER_PATH) // AMQ5806I is a message code for queue manager start .waitingFor(Wait.forLogMessage(".*AMQ5806I.*", 1)); container.start(); @@ -85,15 +82,8 @@ public void inject(TestInjector testInjector) { * @return mqsc config string */ private String mqscConfig() { - final String content = "SET AUTHREC PROFILE('*') PRINCIPAL('" + USER + "') OBJTYPE(TOPIC) AUTHADD(ALL)\n" + return "SET AUTHREC PROFILE('*') PRINCIPAL('" + USER + "') OBJTYPE(TOPIC) AUTHADD(ALL)\n" + "SET AUTHREC PROFILE('*') PRINCIPAL('" + USER + "') OBJTYPE(QUEUE) AUTHADD(ALL)\n" + "SET AUTHREC PROFILE('SYSTEM.DEFAULT.MODEL.QUEUE') OBJTYPE(QUEUE) PRINCIPAL('" + USER + "') AUTHADD(ALL)"; - File targetFile = new File(MQSC_FILE); - try { - FileUtils.writeStringToFile(targetFile, content, Charset.defaultCharset()); - } catch (IOException e) { - throw new RuntimeException("Unable to write to file", e); - } - return targetFile.getAbsolutePath(); } } diff --git a/pom.xml b/pom.xml index c7ab05588869..e2a7f51c146e 100644 --- a/pom.xml +++ b/pom.xml @@ -113,7 +113,7 @@ ${hapi-fhir-version} 6.1.2.2 ${httpclient-version} - 9.3.2.1 + 9.4.0.5 ${icu4j-version} 2.9.3 ${influx-java-driver-version} @@ -238,7 +238,7 @@ docker.io/fsouza/fake-gcs-server:1.47.3 docker.io/greenmail/standalone:2.0.0 docker.io/hashicorp/vault:1.17 - icr.io/ibm-messaging/mq:9.3.2.1-r1 + icr.io/ibm-messaging/mq:9.4.0.5-r1 docker.io/influxdb:1.8.10 quay.io/strimzi-test-container/test-container:latest-kafka-3.8.0 quay.io/strimzi/kafka:latest-kafka-3.7.0 diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml b/poms/bom/src/main/generated/flattened-full-pom.xml index a2ac9e612638..ab24d09e61da 100644 --- a/poms/bom/src/main/generated/flattened-full-pom.xml +++ b/poms/bom/src/main/generated/flattened-full-pom.xml @@ -6548,7 +6548,7 @@ com.ibm.mq com.ibm.mq.jakarta.client - 9.3.2.1 + 9.4.0.5 com.jayway.jsonpath diff --git a/poms/bom/src/main/generated/flattened-reduced-pom.xml b/poms/bom/src/main/generated/flattened-reduced-pom.xml index 224fd2492ceb..47a3e953826f 100644 --- a/poms/bom/src/main/generated/flattened-reduced-pom.xml +++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml @@ -6548,7 +6548,7 @@ com.ibm.mq com.ibm.mq.jakarta.client - 9.3.2.1 + 9.4.0.5 com.jayway.jsonpath diff --git a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml index f24698f037af..88865d5aee4c 100644 --- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml +++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml @@ -6548,7 +6548,7 @@ com.ibm.mq com.ibm.mq.jakarta.client - 9.3.2.1 + 9.4.0.5 com.jayway.jsonpath