@@ -157,11 +157,13 @@ public async Task StandbyMode_EndToEnd_LinuxContainer()
157
157
158
158
var vars = new Dictionary < string , string >
159
159
{
160
- { EnvironmentSettingNames . ContainerName , "TestContainer" } ,
160
+ { EnvironmentSettingNames . ContainerName , "TestApp" } ,
161
+ { EnvironmentSettingNames . AzureWebsiteName , "TestApp" } ,
161
162
{ EnvironmentSettingNames . ContainerEncryptionKey , encryptionKey } ,
162
163
{ EnvironmentSettingNames . AzureWebsiteContainerReady , null } ,
163
164
{ EnvironmentSettingNames . AzureWebsiteSku , "Dynamic" } ,
164
165
{ EnvironmentSettingNames . AzureWebsiteZipDeployment , null } ,
166
+ { EnvironmentSettingNames . AzureWebJobsSecretStorageType , "Blob" } ,
165
167
{ "AzureWebEncryptionKey" , "0F75CA46E7EBDD39E4CA6B074D1F9A5972B849A55F91A248" }
166
168
} ;
167
169
using ( var env = new TestScopedEnvironmentVariable ( vars ) )
@@ -176,7 +178,10 @@ public async Task StandbyMode_EndToEnd_LinuxContainer()
176
178
177
179
// immediately call a function - expect the call to block until
178
180
// the host is fully specialized
179
- var request = new HttpRequestMessage ( HttpMethod . Get , "api/httptrigger" ) ;
181
+ var secretManager = _httpServer . Host . Services . GetService < ISecretManager > ( ) ;
182
+ var keys = await secretManager . GetFunctionSecretsAsync ( "HttpTrigger" ) ;
183
+ string key = keys . First ( ) . Value ;
184
+ var request = new HttpRequestMessage ( HttpMethod . Get , $ "api/httptrigger?code={ key } ") ;
180
185
request . Headers . Add ( ScriptConstants . AntaresColdStartHeaderName , "1" ) ;
181
186
var response = await _httpClient . SendAsync ( request ) ;
182
187
Assert . Equal ( HttpStatusCode . OK , response . StatusCode ) ;
@@ -225,7 +230,14 @@ private async Task InitializeTestHost(string testDirName)
225
230
{
226
231
var httpConfig = new HttpConfiguration ( ) ;
227
232
var testRootPath = Path . Combine ( Path . GetTempPath ( ) , testDirName ) ;
228
- await FileUtility . DeleteDirectoryAsync ( testRootPath , true ) ;
233
+ try
234
+ {
235
+ await FileUtility . DeleteDirectoryAsync ( testRootPath , true ) ;
236
+ }
237
+ catch
238
+ {
239
+ // best effort cleanup
240
+ }
229
241
230
242
_loggerProvider = new TestLoggerProvider ( ) ;
231
243
var loggerProviderFactory = new TestLoggerProviderFactory ( _loggerProvider ) ;
@@ -292,7 +304,7 @@ private async Task Assign(string encryptionKey)
292
304
var assignmentContext = new HostAssignmentContext
293
305
{
294
306
SiteId = 1234 ,
295
- SiteName = "TestSite " ,
307
+ SiteName = "TestApp " ,
296
308
Environment = environment
297
309
} ;
298
310
var encryptedAssignmentContext = EncryptedHostAssignmentContext . Create ( assignmentContext , encryptionKey ) ;
0 commit comments