This component is based on the google java functions library that works as a client for the Google Cloud Functions.
The unit tests provided are somewhat limited. Due to the nature of the component, it needs to be tested against a google Functions instance because although there are some emulators they doesn't cover all the functionalities.
The tests are organized into two packages:
To run the Google Functions client library, you must first set up authentication by creating a service account key. You can find more info at: Google Cloud 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 for windows:
$Env:GOOGLE_APPLICATION_CREDENTIALS = "/home/user/Downloads/my-key.json"
or directly through the component endpoint
from("google-functions://myCamelFunction?serviceAccountKey=/home/user/Downloads/my-key.json")
Running tests against Google Functions instance:
mvn verify