[Helix] Enable Identity.FunctionalTests (#8564)
This commit is contained in:
parent
d9bf01330a
commit
1f63f25508
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<!-- https://github.com/aspnet/AspNetCore/issues/6549 -->
|
||||
<BuildHelixPayload>false</BuildHelixPayload>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -26,4 +24,29 @@
|
|||
<Reference Include="AngleSharp" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PublishAssets" AfterTargets="Publish">
|
||||
<ItemGroup>
|
||||
<_PublishFiles Include="$(MSBuildThisFileDirectory)..\..\UI\src\bin\$(Configuration)\netcoreapp3.0\Microsoft.AspNetCore.Identity.UI.Views.*.dll" />
|
||||
<_PublishFiles Include="$(MSBuildThisFileDirectory)..\..\testassets\Identity.DefaultUI.WebSite\bin\$(Configuration)\netcoreapp3.0\Identity.DefaultUI.WebSite.deps.json" />
|
||||
<_PublishFiles Include="$(MSBuildThisFileDirectory)..\..\testassets\Identity.DefaultUI.WebSite\bin\$(Configuration)\netcoreapp3.0\Identity.DefaultUI.WebSite.deps.json" />
|
||||
<_wwwrootFiles Include="$(MSBuildThisFileDirectory)..\..\testassets\Identity.DefaultUI.WebSite\wwwroot\**\*.*" />
|
||||
<_PagesFiles Include="$(MSBuildThisFileDirectory)..\..\testassets\Identity.DefaultUI.WebSite\Pages\**\*.*" />
|
||||
</ItemGroup>
|
||||
<Copy
|
||||
SourceFiles="@(_PublishFiles)"
|
||||
DestinationFolder="$(PublishDir)" />
|
||||
<Copy
|
||||
SourceFiles="@(_PagesFiles)"
|
||||
DestinationFolder="$(PublishDir)\Identity.DefaultUI.WebSite\Pages" />
|
||||
<Copy
|
||||
SourceFiles="@(_wwwrootFiles)"
|
||||
DestinationFolder="$(PublishDir)\Identity.DefaultUI.WebSite\wwwroot" />
|
||||
<!-- Drop a dummy sln to specify content root location -->
|
||||
<WriteLinesToFile
|
||||
File="$(PublishDir)\contentroot.sln"
|
||||
Lines="Ignored"
|
||||
Overwrite="true"
|
||||
Encoding="Unicode"/>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Identity.DefaultUI.WebSite
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides version hash for a specified file.
|
||||
/// </summary>
|
||||
internal class FileVersionProvider : IFileVersionProvider
|
||||
{
|
||||
public string AddFileVersionToPath(PathString requestPathBase, string path) => path;
|
||||
}
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
integrity="sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o">
|
||||
</script>
|
||||
</environment>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
<script src="~/js/site.js"></script>
|
||||
|
||||
@RenderSection("Scripts", required: false)
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Builder;
|
|||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.UI;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Diagnostics;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
|
@ -51,11 +52,16 @@ namespace Identity.DefaultUI.WebSite
|
|||
|
||||
services.AddMvc()
|
||||
.AddNewtonsoftJson();
|
||||
|
||||
services.AddSingleton<IFileVersionProvider, FileVersionProvider>();
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
// This prevents running out of file watchers on some linux machines
|
||||
((PhysicalFileProvider)env.WebRootFileProvider).UseActivePolling = false;
|
||||
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
|
|
|
|||
Loading…
Reference in New Issue