Swamy/15jan2021 small refactoring (#1580)
* Small Refactoring inside Basket Service folder * Small Refactoring
This commit is contained in:
parent
afb4534acc
commit
130e46ccdf
@ -12,6 +12,7 @@ namespace Basket.API.Infrastructure.Middlewares
|
||||
private bool _mustFail;
|
||||
private readonly FailingOptions _options;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
public FailingMiddleware(RequestDelegate next, ILogger<FailingMiddleware> logger, FailingOptions options)
|
||||
{
|
||||
_next = next;
|
||||
@ -19,6 +20,7 @@ namespace Basket.API.Infrastructure.Middlewares
|
||||
_mustFail = false;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task Invoke(HttpContext context)
|
||||
{
|
||||
var path = context.Request.Path;
|
||||
|
@ -61,7 +61,8 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
|
||||
|
||||
})
|
||||
.ConfigureAppConfiguration(x => x.AddConfiguration(configuration))
|
||||
.UseFailing(options => {
|
||||
.UseFailing(options =>
|
||||
{
|
||||
options.ConfigPath = "/Failing";
|
||||
options.NotFilteredPaths.AddRange(new[] { "/hc", "/liveness" });
|
||||
})
|
||||
|
@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using Microsoft.eShopOnContainers.Services.Basket.API;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
|
||||
namespace Basket.FunctionalTests.Base
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user