Merge remote-tracking branch 'origin/netcore/netcore' into netcore/task/6973-migrating-authenticationcontroller
# Conflicts: # src/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTest.cs # src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs # src/Umbraco.Web.BackOffice/Controllers/BackOfficeController.cs # src/Umbraco.Web/Editors/BackOfficeController.cs # src/Umbraco.Web/Mvc/UmbracoController.cs
This commit is contained in:
@@ -92,7 +92,8 @@ namespace Umbraco.Tests.Integration.Testing
|
||||
var host = hostBuilder.StartAsync().GetAwaiter().GetResult();
|
||||
Services = host.Services;
|
||||
var app = new ApplicationBuilder(host.Services);
|
||||
Configure(app);
|
||||
Configure(app); //Takes around 200 ms
|
||||
|
||||
|
||||
OnFixtureTearDown(() => host.Dispose());
|
||||
}
|
||||
@@ -274,14 +275,13 @@ namespace Umbraco.Tests.Integration.Testing
|
||||
|
||||
public virtual void Configure(IApplicationBuilder app)
|
||||
{
|
||||
Services.GetRequiredService<IBackOfficeSecurityFactory>().EnsureBackOfficeSecurity();
|
||||
Services.GetRequiredService<IUmbracoContextFactory>().EnsureUmbracoContext();
|
||||
|
||||
// get the currently set options
|
||||
//get the currently set options
|
||||
var testOptions = TestOptionAttributeBase.GetTestOptions<UmbracoTestAttribute>();
|
||||
if (testOptions.Boot)
|
||||
{
|
||||
app.UseUmbracoCore();
|
||||
Services.GetRequiredService<IBackOfficeSecurityFactory>().EnsureBackOfficeSecurity();
|
||||
Services.GetRequiredService<IUmbracoContextFactory>().EnsureUmbracoContext();
|
||||
app.UseUmbracoCore(); // Takes 200 ms
|
||||
}
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ namespace Umbraco.Tests.Integration.Testing
|
||||
|
||||
public TestHelper TestHelper = new TestHelper();
|
||||
|
||||
protected string TestDBConnectionString { get; private set; }
|
||||
protected virtual string TestDBConnectionString { get; private set; }
|
||||
|
||||
protected virtual Action<IServiceCollection> CustomTestSetup => services => { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user