Demonstrates how to system test a function triggered by Pub/Sub. This is an "end-to-end" test that assumes you have deployed the Cloud Function to test. The code in this example triggers the Cloud Function by publishing a Pub/Sub message and then waiting to observe expected output in Cloud Logging.
Code sample
Go
To authenticate to Cloud Run functions, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Java
To authenticate to Cloud Run functions, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Node.js
To authenticate to Cloud Run functions, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Python
To authenticate to Cloud Run functions, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
What's next
To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.