You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/02/17 06:24:34 UTC
[camel] 05/31: CAMEL-15964 create camel-google-storage component
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 407a7b81cd4a9b0d791a5ebe4e985e81e450812c
Author: Raffaele Marcello <ma...@gmail.com>
AuthorDate: Thu Feb 11 21:59:55 2021 +0100
CAMEL-15964 create camel-google-storage component
---
components/camel-google-storage/ReadMe.md | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/components/camel-google-storage/ReadMe.md b/components/camel-google-storage/ReadMe.md
index fcefc05..e0af72a 100644
--- a/components/camel-google-storage/ReadMe.md
+++ b/components/camel-google-storage/ReadMe.md
@@ -1,5 +1,5 @@
# Camel Google Storage Component
-This component is based on the https://github.com/googleapis/java-storage[google java storage library] that works as a client for the Google Cloud Storage.
+This component is based on the [google java storage library](https://github.com/googleapis/java-storage) that works as a client for the Google Cloud Storage.
## Camel Google Storage Component testing
@@ -9,18 +9,26 @@ Due to the nature of the component, it needs to be tested against a google Stora
they doesn't cover all the functionalities.
The tests are organized into two packages:
-* Unit : <br>
- Standalone tests that can be conducted on their own
-* Integration : <br>
- Tests against a Google Storage instance
+* **Unit** : Standalone tests that can be conducted on their own
+* **Integration** : Tests against a Google Storage instance
-For the Unit tests has been extended the emulator https://github.com/googleapis/java-storage-nio/blob/master/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/testing/FakeStorageRpc.java[FakeStorageRpc]
+For the Unit tests has been extended the emulator [google-cloud-nio](https://github.com/googleapis/java-storage-nio/tree/master/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/testing)
adding some functionalities (bucket creation and deletion). However there are still some unsupported operations.
### Execution of integration tests
-A Google Cloud account with a project...
+To run the Google Storage client library, you must first set up authentication by creating a service account key.
+You can find more info at: (cloud.google.com/storage/docs/reference/libraries#setting_up_authentication)[https://cloud.google.com/storage/docs/reference/libraries#setting_up_authentication].
+
+When you have the **service account key** you can provide authentication credentials to your application code by setting the environment variable:
+
+`export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/my-key.json"`
+
+or directly through the component endpoint
+
+`from("google-storage://myCamelBucket?serviceAccountCredentials=/home/user/Downloads/my-key.json")`
+
Running tests against Storage instance: