File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,25 @@ def test_debug_logging_enabled(self):
203
203
self .assertIn ('logging error' , func_log )
204
204
self .assertIn ('logging debug' , func_log )
205
205
206
+ def test_pinning_functions_to_older_version (self ):
207
+ """An HttpTrigger function app with 'azure-functions==1.11.1' library
208
+ should return 200 with the azure functions version set to 1.11.1
209
+ since dependency isolation is enabled by default for all py versions
210
+ """
211
+ with LinuxConsumptionWebHostController (_DEFAULT_HOST_VERSION ,
212
+ self ._py_version ) as ctrl :
213
+
214
+ ctrl .assign_container (env = {
215
+ "AzureWebJobsStorage" : self ._storage ,
216
+ "SCM_RUN_FROM_PACKAGE" : self ._get_blob_url (
217
+ "PinningFunctions" ),
218
+ })
219
+ req = Request ('GET' , f'{ ctrl .url } /api/HttpTrigger1' )
220
+ resp = ctrl .send_request (req )
221
+
222
+ self .assertEqual (resp .status_code , 200 )
223
+ self .assertIn ("Func Version: 1.11.1" , resp .text )
224
+
206
225
def _get_blob_url (self , scenario_name : str ) -> str :
207
226
return (
208
227
f'https://pythonworker{ self ._py_shortform } sa.blob.core.windows.net/'
You can’t perform that action at this time.
0 commit comments