Fix issue running UmbracoTestServerTestBase tests with debugger attached

Ensure ConfigureWebServer called before ConfigureServices for tests that
make use of WebApplicationFactory.

Still not apparent why tests would pass if debugger isn't attached?
This commit is contained in:
Paul Johnson
2022-02-11 14:24:45 +00:00
parent 87407442ad
commit 76cda7fd0c
4 changed files with 63 additions and 31 deletions

View File

@@ -29,11 +29,8 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Examine.Lucene.UmbracoExamine
protected IRuntimeState RunningRuntimeState { get; } = Mock.Of<IRuntimeState>(x => x.Level == RuntimeLevel.Run);
public override void ConfigureServices(IServiceCollection services)
{
base.ConfigureServices(services);
services.AddSingleton<IndexInitializer>();
}
protected override void ConfigureTestSpecificServices(IServiceCollection services)
=> services.AddSingleton<IndexInitializer>();
/// <summary>
/// Used to create and manage a testable index