Skip to content

Latest commit

 

History

History
41 lines (23 loc) · 1.15 KB

File metadata and controls

41 lines (23 loc) · 1.15 KB

Google Cloud Platform logo

Google Cloud Functions - Hello World Pub/Sub sample

See:

Deploy and run the sample

See the Cloud Functions Hello World tutorial.

Note: in order for the tests to run properly, you'll have to deploy some of the sample functions:

gcloud functions deploy helloPubSub --trigger-topic $FUNCTIONS_TOPIC --runtime [YOUR_RUNTIME]
  • Replace [YOUR_RUNTIME] with the name of the runtime you are using. For a complete list, see the gcloud reference.

Run the tests

  1. Read and follow the prerequisites.

  2. Install dependencies:

     npm install
    
  3. Set the following environment variables:

     export FUNCTIONS_TOPIC=[YOUR_PUBSUB_TOPIC]
    
  4. Run the tests:

     npm test