Enable KeyVault hosting startup (#149)

This commit is contained in:
Pavel Krymets 2018-02-14 10:38:32 -08:00 committed by GitHub
parent cedf51bf07
commit 37db7a2367
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@
<environmentVariables xdt:Transform="InsertIfMissing">
<add name="DOTNET_ADDITIONAL_DEPS" value="%XDT_EXTENSIONPATH%\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\;%XDT_EXTENSIONPATH%\additionalDeps\Microsoft.AspNetCore.AzureKeyVault.HostingStartup\;%ProgramFiles%\dotnet\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\" xdt:Locator="Match(name)" xdt:Transform="InsertOrAppendAttribute(Attribute='value')" />
<add name="DOTNET_SHARED_STORE" value="%XDT_EXTENSIONPATH%\store" xdt:Locator="Match(name)" xdt:Transform="InsertOrAppendAttribute(Attribute='value')" />
<add name="ASPNETCORE_HOSTINGSTARTUPASSEMBLIES" value="Microsoft.AspNetCore.AzureAppServices.HostingStartup" xdt:Locator="Match(name)" xdt:Transform="InsertOrAppendAttribute(Attribute='value')" />
<add name="ASPNETCORE_HOSTINGSTARTUPASSEMBLIES" value="Microsoft.AspNetCore.AzureAppServices.HostingStartup;Microsoft.AspNetCore.AzureKeyVault.HostingStartup" xdt:Locator="Match(name)" xdt:Transform="InsertOrAppendAttribute(Attribute='value')" />
</environmentVariables>
</runtime>
</system.webServer>

View File

@ -44,7 +44,7 @@ namespace Microsoft.AspNetCore.AzureAppServices.SiteExtension
var startupAssembliesElement = sharedStoreElement.NextSibling;
Assert.Equal("add", startupAssembliesElement.Name);
Assert.Equal("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", startupAssembliesElement.Attributes["name"].Value);
Assert.Equal("Microsoft.AspNetCore.AzureAppServices.HostingStartup", startupAssembliesElement.Attributes["value"].Value);
Assert.Equal("Microsoft.AspNetCore.AzureAppServices.HostingStartup;Microsoft.AspNetCore.AzureKeyVault.HostingStartup", startupAssembliesElement.Attributes["value"].Value);
}
[Fact]
@ -76,7 +76,7 @@ namespace Microsoft.AspNetCore.AzureAppServices.SiteExtension
var startupAssembliesElement = sharedStoreElement.NextSibling;
Assert.Equal("add", startupAssembliesElement.Name);
Assert.Equal("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", startupAssembliesElement.Attributes["name"].Value);
Assert.Equal("ExistingValue2;Microsoft.AspNetCore.AzureAppServices.HostingStartup", startupAssembliesElement.Attributes["value"].Value);
Assert.Equal("ExistingValue2;Microsoft.AspNetCore.AzureAppServices.HostingStartup;Microsoft.AspNetCore.AzureKeyVault.HostingStartup", startupAssembliesElement.Attributes["value"].Value);
}
private static XmlDocument LoadDocAndRunTransform(string docName)