Azure / Azure/azure-functions-java-worker

Provide access to settings through context parameter

未关闭
#281 2 条评论 0 个 reaction 已指派 1 人 已被 @kamperiadis 认领 在 GitHub 查看
area:java-functions New Feature reviewed
主要语言
Java
星标
103
派生
74
平均合并
4 天 8 小时
30 天内合并 PR
2

描述

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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。