Skip to content

Provide access to settings through context parameter #89

Open
@hannesne

Description

@hannesne

I created the following issue on the java worker repo, but this repo seems to be a better fit. Azure/azure-functions-java-worker#281

Currently it is hard to unit test a function that uses an app setting by reading it from the environment variables. It would be much easier if there was a getSetting(settingName) method on the context parameter, as the context parameter can be mocked in unit tests. At runtime the host can continue to read the value from an environment variable via the method in the context parameter, so there wouldn't be any breaking changes to the runtime.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions