diff --git a/README.md b/README.md index 192a9b55..9dffc60c 100644 --- a/README.md +++ b/README.md @@ -322,7 +322,6 @@ You can configure the Functions Framework using command-line flags or environmen | `--signature-type` | `FUNCTION_SIGNATURE_TYPE` | The signature used when writing your function. Controls unmarshalling rules and determines which arguments are used to invoke your function. Default: `http`; accepted values: `http`, `event` or `cloudevent` | | `--source` | `FUNCTION_SOURCE` | The path to the file containing your function. Default: `main.py` (in the current working directory) | | `--debug` | `DEBUG` | A flag that allows to run functions-framework to run in debug mode, including live reloading. Default: `False` | -| `--dry-run` | `DRY_RUN` | A flag that allows for testing the function build from the configuration without creating a server. Default: `False` | ## Enable Google Cloud Function Events diff --git a/src/functions_framework/_cli.py b/src/functions_framework/_cli.py index 663ea50f..5b54a1cd 100644 --- a/src/functions_framework/_cli.py +++ b/src/functions_framework/_cli.py @@ -32,12 +32,6 @@ @click.option("--host", envvar="HOST", type=click.STRING, default="0.0.0.0") @click.option("--port", envvar="PORT", type=click.INT, default=8080) @click.option("--debug", envvar="DEBUG", is_flag=True) -@click.option("--dry-run", envvar="DRY_RUN", is_flag=True) -def _cli(target, source, signature_type, host, port, debug, dry_run): +def _cli(target, source, signature_type, host, port, debug): app = create_app(target, source, signature_type) - if dry_run: - click.echo("Function: {}".format(target)) - click.echo("URL: http://{}:{}/".format(host, port)) - click.echo("Dry run successful, shutting down.") - else: - create_server(app, debug).run(host, port) + create_server(app, debug).run(host, port) diff --git a/tests/test_cli.py b/tests/test_cli.py index aa4a901e..7613b649 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -69,18 +69,6 @@ def test_cli_no_arguments(): [pretend.call("foo", None, "event")], [pretend.call("0.0.0.0", 8080)], ), - ( - ["--target", "foo", "--dry-run"], - {}, - [pretend.call("foo", None, "http")], - [], - ), - ( - [], - {"FUNCTION_TARGET": "foo", "DRY_RUN": "True"}, - [pretend.call("foo", None, "http")], - [], - ), ( ["--target", "foo", "--host", "127.0.0.1"], {},