mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 15:58:16 +08:00
Feature/#623 (#632)
* #630 only set status code if response hasnt started, otherwise exception * #623 made {RemoteIpAddress} available as placeholder so you can do x-forwarded-for * #623 local address different on mac, windows and linux for integration test
This commit is contained in:
@ -15,6 +15,9 @@ using Ocelot.Request.Middleware;
|
||||
|
||||
namespace Ocelot.UnitTests.Headers
|
||||
{
|
||||
using Ocelot.Infrastructure;
|
||||
using Ocelot.Logging;
|
||||
|
||||
public class AddHeadersToRequestClaimToThingTests
|
||||
{
|
||||
private readonly AddHeadersToRequest _addHeadersToRequest;
|
||||
@ -24,11 +27,15 @@ namespace Ocelot.UnitTests.Headers
|
||||
private List<ClaimToThing> _configuration;
|
||||
private Response _result;
|
||||
private Response<string> _claimValue;
|
||||
private Mock<IPlaceholders> _placeholders;
|
||||
private Mock<IOcelotLoggerFactory> _factory;
|
||||
|
||||
public AddHeadersToRequestClaimToThingTests()
|
||||
{
|
||||
_parser = new Mock<IClaimsParser>();
|
||||
_addHeadersToRequest = new AddHeadersToRequest(_parser.Object);
|
||||
_placeholders = new Mock<IPlaceholders>();
|
||||
_factory = new Mock<IOcelotLoggerFactory>();
|
||||
_addHeadersToRequest = new AddHeadersToRequest(_parser.Object, _placeholders.Object, _factory.Object);
|
||||
_downstreamRequest = new DownstreamRequest(new HttpRequestMessage(HttpMethod.Get, "http://test.com"));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user