@@ -98,6 +98,25 @@ def create_container(self, image_repo: str, image_url: str,
98
98
99
99
worker_path = os .path .join (PROJECT_ROOT , 'azure_functions_worker' )
100
100
script_path = os .path .join (TESTS_ROOT , configs .script_path )
101
+ env = {"AzureWebJobsFeatureFlags" : "EnableWorkerIndexing" ,
102
+ "AzureWebJobsStorage" : f"{ os .getenv ('AzureWebJobsStorage' )} " ,
103
+ "AzureWebJobsEventHubConnectionString" :
104
+ f"{ os .getenv ('AzureWebJobsEventHubConnectionString' )} " ,
105
+ "AzureWebJobsCosmosDBConnectionString" :
106
+ f"{ os .getenv ('AzureWebJobsCosmosDBConnectionString' )} " ,
107
+ "AzureWebJobsServiceBusConnectionString" :
108
+ f"{ os .getenv ('AzureWebJobsServiceBusConnectionString' )} "
109
+ "AzureWebJobsEventHubConnectionString"
110
+ f"{ os .getenv ('AzureWebJobsEventHubConnectionString' )} " ,
111
+ "AzureWebJobsSqlConnectionString" :
112
+ f"{ os .getenv ('AzureWebJobsSqlConnectionString' )} " ,
113
+ "AzureWebJobsEventGridTopicUri" :
114
+ f"{ os .getenv ('AzureWebJobsEventGridTopicUri' )} " ,
115
+ "AzureWebJobsEventGridConnectionKey" :
116
+ f"{ os .getenv ('AzureWebJobsEventGridConnectionKey' )} "
117
+ }
118
+
119
+ configs .env .update (env )
101
120
102
121
image = self .find_latest_image (image_repo , image_url )
103
122
@@ -129,31 +148,6 @@ def create_container(self, image_repo: str, image_url: str,
129
148
run_cmd .extend (["--cap-add" , "SYS_ADMIN" ])
130
149
run_cmd .extend (["--device" , "/dev/fuse" ])
131
150
run_cmd .extend (["-e" , f"CONTAINER_NAME={ _uuid } " ])
132
- run_cmd .extend (["-e" , "AzureWebJobsFeatureFlags=EnableWorkerIndexing" ])
133
- run_cmd .extend (["-e" ,
134
- "AzureWebJobsStorage="
135
- f"{ os .getenv ('AzureWebJobsStorage' )} " ])
136
- run_cmd .extend (["-e" ,
137
- "AzureWebJobsEventHubConnectionString="
138
- f"{ os .getenv ('AzureWebJobsEventHubConnectionString' )} " ])
139
- run_cmd .extend (["-e" ,
140
- "AzureWebJobsCosmosDBConnectionString="
141
- f"{ os .getenv ('AzureWebJobsCosmosDBConnectionString' )} " ])
142
- run_cmd .extend (["-e" ,
143
- "AzureWebJobsServiceBusConnectionString="
144
- f"{ os .getenv ('AzureWebJobsServiceBusConnectionString' )} " ]) # NoQA
145
- run_cmd .extend (["-e" ,
146
- "AzureWebJobsEventHubConnectionString="
147
- f"{ os .getenv ('AzureWebJobsEventHubConnectionString' )} " ])
148
- run_cmd .extend (["-e" ,
149
- "AzureWebJobsSqlConnectionString="
150
- f"{ os .getenv ('AzureWebJobsSqlConnectionString' )} " ])
151
- run_cmd .extend (["-e" ,
152
- "AzureWebJobsEventGridTopicUri="
153
- f"{ os .getenv ('AzureWebJobsEventGridTopicUri' )} " ])
154
- run_cmd .extend (["-e" ,
155
- "AzureWebJobsEventGridConnectionKey="
156
- f"{ os .getenv ('AzureWebJobsEventGridConnectionKey' )} " ])
157
151
run_cmd .extend (["-e" , f"AzureFunctionsWebHost__hostid={ _uuid } " ])
158
152
run_cmd .extend (["-v" , f"{ worker_path } :{ container_worker_path } " ])
159
153
run_cmd .extend (["-v" , f"{ script_path } :{ function_path } " ])
0 commit comments