Azure / Azure/azure-functions-java-worker

Provide access to settings through context parameter

Aperta
#281 2 commenti 0 reazioni 1 assegnatario Rivendicata da @kamperiadis Vedi su GitHub
area:java-functions New Feature reviewed
Lingua principale
Java
Stelle
103
Fork
74
Merge medio
4g 8h
PR unite (30g)
2

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.