A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/GoogleCloudPlatform/functions-framework-conformance below:

GoogleCloudPlatform/functions-framework-conformance: A Tool for Validating Conformance to the Functions Framework Contract

Functions Framework Conformance

This project contains tooling for conformance and validation of Function Frameworks to the Functions Framework contract.

  1. In your Functions Framework repo:

    Each function write its inputs to the file function_output.json.

  2. Build the test client:

    cd functions-framework-conformance/client && \
      go build

    This will create a client binary in functions-framework-conformance/client directory. You can use this binary to test the conformance of Function Frameworks.

  3. Invoke the client binary with the following command to run your function server and the type of the function.

    If there are validation errors, an error will be logged in the output, causing your conformance test to fail.

Configuration flag Type Default Description -cmd string "''" A string with the command to run a Functions Framework server at localhost:8080. Must be wrapped in quotes. Ignored if -buildpacks=true. -type string "http" The function signature to use (must be "http", "cloudevent", or "legacyevent"). -declarative-type string "" The declarative signature type of the function (must be 'http', 'cloudevent', 'legacyevent', or 'typed'), default matches -type -validate-mapping boolean true Whether to validate mapping from legacy->cloud events and vice versa (as applicable). -output-file string "function_output.json" Name of file output by function. -buildpacks boolean true Whether to use the current release of buildpacks to run the validation. If true, -cmd is ignored and --builder-* flags must be set. -builder-source string "" Function source directory to use in building. Required if -buildpacks=true. -builder-target string "" Function target to use in building. Required if -buildpacks=true. -builder-runtime string "" Runtime to use in building. Required if -buildpacks=true. -builder-runtime-version string "" Runtime version used while building. Buildpack will use the latest version if flag is not specified. -builder-tag string "latest" Builder image tag to use in building. Ignored if -builder-url is specified. -builder-url string "" Builder image url to use in building including tag. Client defaults to gcr.io/gae-runtimes/buildpacks/<language>/builder:<builder-tag> if none is specified. -start-delay uint 1 Seconds to wait before sending HTTP request to command process. -envs string "" A comma separated string of additional runtime environment variables.

If -buildpacks is true, you must specify the following flags:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4