JiriOndrusek commented on a change in pull request #2116:
URL:
https://github.com/apache/camel-quarkus/pull/2116#discussion_r553804283##########
File path: integration-tests/minio/src/test/java/org/apache/camel/quarkus/component/minio/it/MinioTestResource.java
##########
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.minio.it;
+
+import java.time.Duration;
+import java.util.Map;
+
+import org.apache.camel.quarkus.testcontainers.ContainerResourceLifecycleManager;
+import org.apache.camel.util.CollectionHelper;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.wait.strategy.HttpWaitStrategy;
+
+public class MinioTestResource implements ContainerResourceLifecycleManager {
+
+ public static final String CONTAINER_ACCESS_KEY = "MINIO_ACCESS_KEY";
+ public static final String CONTAINER_SECRET_KEY = "MINIO_SECRET_KEY";
+ private final String CONTAINER_IMAGE = "minio/minio:latest";
Review comment:
I've replaced latest with the current tag.
##########
File path: docs/modules/ROOT/pages/reference/extensions/minio.adoc
##########
@@ -31,3 +31,11 @@ Please refer to the above link for usage and configuration details.
----
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
+
+== Camel Quarkus limitations
+
+This extension leverages the Quarkiverse Minio. Standard application.properties mechanism is used to define connection (see
http://github.com/quarkiverse/quarkiverse-minio#configuration-reference[documentation]).
+
+It is mandatory to configure the Minio client in properties and Camel will autowire client into the Mino component.
Review comment:
fixed
##########
File path: integration-tests/minio/src/test/java/org/apache/camel/quarkus/component/minio/it/MinioTest.java
##########
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.minio.it;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import io.restassured.response.ValidatableResponse;
+import io.restassured.specification.RequestSpecification;
+import org.apache.camel.component.minio.MinioConstants;
+import org.apache.camel.component.minio.MinioOperations;
+import org.apache.camel.util.CollectionHelper;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static org.awaitility.Awaitility.await;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.equalTo;
+
+@QuarkusTest
+@QuarkusTestResource(MinioTestResource.class)
+class MinioTest {
+
+ private final String BUCKET_NAME = "mycamel";
+
+ @Test
+ public void testConsumer() throws Exception {
+ initClient();
+
+ ExecutorService executor = Executors.newSingleThreadExecutor();
+
+ Future<String> fr1 = executor.submit(
+ () -> RestAssured.get("/minio/consumer")
+ .then()
+ .extract().asString());
Review comment:
thanks for the advice, I'll try it that way.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[hidden email]