Changes integration tests working folder, hopefully this works on azure devops

This commit is contained in:
Shannon
2020-03-31 18:01:27 +11:00
parent 8535d0fbe3
commit 4ee3cf02d9
4 changed files with 42 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Umbraco.Tests.Integration.Implementations;
namespace Umbraco.Tests.Integration.Extensions
@@ -18,6 +19,8 @@ namespace Umbraco.Tests.Integration.Extensions
services.AddSingleton<IHttpContextAccessor>(x => testHelper.GetHttpContextAccessor());
// the generic host does add IHostEnvironment but not this one because we are not actually in a web context
services.AddSingleton<IWebHostEnvironment>(x => webHostEnvironment);
// replace the IHostEnvironment that generic host created too
services.AddSingleton<IHostEnvironment>(x => webHostEnvironment);
}
}
}