JiriOndrusek commented on a change in pull request #2505:
URL: https://github.com/apache/camel-quarkus/pull/2505#discussion_r618981647



##########
File path: 
integration-tests/google-storage/src/test/java/org/apache/camel/quarkus/component/google/storage/it/GoogleStorageTest.java
##########
@@ -0,0 +1,202 @@
+/*
+ * 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.google.storage.it;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+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 org.apache.camel.component.google.storage.GoogleCloudStorageConstants;
+import org.apache.camel.component.google.storage.GoogleCloudStorageOperations;
+import org.apache.camel.util.CollectionHelper;
+import org.hamcrest.Matcher;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.Matchers.both;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.startsWith;
+
+@QuarkusTest
+@QuarkusTestResource(GoogleStorageTestResource.class)
+class GoogleStorageTest {
+
+    private static final String DEST_BUCKET = "camel_quarkus_test_dest_bucket";
+    private static final String TEST_BUCKET1 = "camel_quarkus_test_bucket1";
+    private static final String TEST_BUCKET2 = "camel_quarkus_test_bucket2";
+    private static final String TEST_BUCKET3 = "camel_quarkus_test_bucket3";
+    private static final String FILE_NAME_007 = "file007";
+    private static final String FILE_NAME_006 = "file006";
+
+    @BeforeEach
+    public void beforeEach() {
+        
RestAssured.given().get("/google-storage/loadComponent").then().statusCode(200);

Review comment:
       To be honest I don't like it either, but I need to configure component 
before usage. Better approach would be to use `@BeforeAll`, but than the method 
has to be static, which won't allow me to call `/google-storage/loadComponent`.
   
   The other approach I see is to allow order of the tests and then call it 
only once in the first test. But this approach seems like a lesser evil to me. 
(there is an if statement, which skips second initialization) WDYT? 
@aldettinger 




-- 
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:
us...@infra.apache.org


Reply via email to