tree: 93954c9b44d1b4cd9dff215ead18f156be3b5491 [path history] [tgz]
  1. src/
  2. .gitignore
  3. pom.xml
  4. ReadMe.md
components/camel-google-pubsub/ReadMe.md

Camel Google PubSub Component testing

The unit tests provided are somewhat limited. Due to the nature of the component, it needs to be tested against a server. To assist with this task Google has provided a PubSub Emulator. The test for the component, therefore, have been split into two groups :

  • Unit :
    Standalone tests that can be conducted on their own
  • Integration :
    Tests against the emulator

Emulator local installation

Emulator is being distributed with the Google SDK. Once the SDK has been installed and configured, add PubSub Emulator:

gcloud components install pubsub-emulator

Please note the folder where it is installed and configure GCLOUD_SDK_PATH environmental variable. It is a custom variable, used by mvn plugin to find the installation.

Execution

Maven is configured to start the emulator prior the integration tests and shut down afterwards. The emulator is configured to listen to port 8383.

Integration tests and the emulator will eb available as part of google-pubsub-test profile:

mvn -Pgoogle-pubsub-test verify