Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 1 day ago
JSON representation

An HTTP cloud function test fixture.

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')`.