https://github.com/dev-michael-schmidt/cloud-func-test-fixture
An HTTP cloud function test fixture.
https://github.com/dev-michael-schmidt/cloud-func-test-fixture
Last synced: 30 days ago
JSON representation
An HTTP cloud function test fixture.
- Host: GitHub
- URL: https://github.com/dev-michael-schmidt/cloud-func-test-fixture
- Owner: dev-michael-schmidt
- License: mit
- Created: 2021-10-08T15:17:38.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-08T16:25:30.000Z (over 4 years ago)
- Last Synced: 2025-03-04T07:13:53.148Z (over 1 year ago)
- Language: Python
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cloud-func-test-fixture
An HTTP cloud function test fixture.
### Use:
1) Open this project in VS code.
2) Write your code in `entrypoint.py` under the `test_fixture` function.
3) Go to the debug tile on the left.
4) Set breakpoints in the gutter and press debug -> "Debug fixture" or press `F5`.
### Requirements:
1) Docker installed and running
2) VS Code with Docker and Python extensions
3) Obtain a credentials.json by creating an API key for the service account in the console.
4) Fill payload.json with the JSON payload of the incoming request.
### Configure:
1) Add, modify, or delete any environmental variables in `Dockerfile` with the `ENV` directive. These variables can also be set in the cloud function configuration. Access these variable in python using `os`. E.g `os.environ.get('FOO')`.