mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 16:28:17 +08:00
Fix brace line spacing and remove multiple concurrent whitespace characters
SA1025, SA1505, SA1508, SA-1509, SA1513
This commit is contained in:
@ -177,7 +177,7 @@ namespace Ocelot.AcceptanceTests
|
||||
AuthenticationOptions = new FileAuthenticationOptions
|
||||
{
|
||||
AuthenticationProviderKey = "Test",
|
||||
AllowedScopes = new List<string>{ "api", "api.readOnly", "openid", "offline_access" },
|
||||
AllowedScopes = new List<string>{ "api", "api.readOnly", "openid", "offline_access" },
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -218,7 +218,7 @@ namespace Ocelot.AcceptanceTests
|
||||
AuthenticationOptions = new FileAuthenticationOptions
|
||||
{
|
||||
AuthenticationProviderKey = "Test",
|
||||
AllowedScopes = new List<string>{ "api", "openid", "offline_access" },
|
||||
AllowedScopes = new List<string>{ "api", "openid", "offline_access" },
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -356,7 +356,6 @@ namespace Ocelot.AcceptanceTests
|
||||
"CustomerId", "LocationId", "UserType", "UserId"
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
.AddInMemoryClients(new List<Client>
|
||||
{
|
||||
@ -437,7 +436,6 @@ namespace Ocelot.AcceptanceTests
|
||||
"CustomerId", "LocationId", "UserType", "UserId", "Role"
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
.AddInMemoryClients(new List<Client>
|
||||
{
|
||||
@ -450,7 +448,6 @@ namespace Ocelot.AcceptanceTests
|
||||
AccessTokenType = tokenType,
|
||||
Enabled = true,
|
||||
RequireClientSecret = false,
|
||||
|
||||
}
|
||||
})
|
||||
.AddTestUsers(users);
|
||||
|
@ -52,7 +52,7 @@ namespace Ocelot.AcceptanceTests
|
||||
UpstreamHttpMethod = new List<string> { "Get" },
|
||||
HttpHandlerOptions = new FileHttpHandlerOptions
|
||||
{
|
||||
UseTracing = true
|
||||
UseTracing = true
|
||||
},
|
||||
QoSOptions = new FileQoSOptions
|
||||
{
|
||||
@ -77,7 +77,7 @@ namespace Ocelot.AcceptanceTests
|
||||
UpstreamHttpMethod = new List<string> { "Get" },
|
||||
HttpHandlerOptions = new FileHttpHandlerOptions
|
||||
{
|
||||
UseTracing = true
|
||||
UseTracing = true
|
||||
},
|
||||
QoSOptions = new FileQoSOptions
|
||||
{
|
||||
|
@ -156,7 +156,7 @@ namespace Ocelot.AcceptanceTests
|
||||
{
|
||||
new ApiResource
|
||||
{
|
||||
Name = apiName,
|
||||
Name = apiName,
|
||||
Description = "My API",
|
||||
Enabled = true,
|
||||
DisplayName = "test",
|
||||
|
@ -56,7 +56,7 @@ namespace Ocelot.AcceptanceTests
|
||||
UpstreamHttpMethod = new List<string> { "Get" },
|
||||
RequestIdKey = _steps.RequestIdKey,
|
||||
|
||||
RateLimitOptions = new FileRateLimitRule()
|
||||
RateLimitOptions = new FileRateLimitRule()
|
||||
{
|
||||
EnableRateLimiting = true,
|
||||
ClientWhitelist = new List<string>(),
|
||||
@ -75,7 +75,6 @@ namespace Ocelot.AcceptanceTests
|
||||
QuotaExceededMessage = "",
|
||||
RateLimitCounterPrefix = "",
|
||||
HttpStatusCode = 428
|
||||
|
||||
},
|
||||
RequestIdKey ="oceclientrequest"
|
||||
}
|
||||
@ -117,7 +116,7 @@ namespace Ocelot.AcceptanceTests
|
||||
UpstreamHttpMethod = new List<string> { "Get" },
|
||||
RequestIdKey = _steps.RequestIdKey,
|
||||
|
||||
RateLimitOptions = new FileRateLimitRule()
|
||||
RateLimitOptions = new FileRateLimitRule()
|
||||
{
|
||||
EnableRateLimiting = true,
|
||||
ClientWhitelist = new List<string>() { "ocelotclient1"},
|
||||
@ -172,7 +171,5 @@ namespace Ocelot.AcceptanceTests
|
||||
|
||||
_builder.Start();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -352,7 +352,6 @@ namespace Ocelot.AcceptanceTests
|
||||
app.UsePathBase(basePath);
|
||||
app.Run(context =>
|
||||
{
|
||||
|
||||
if(string.IsNullOrEmpty(basePath))
|
||||
{
|
||||
context.Response.StatusCode = statusCode;
|
||||
|
@ -70,8 +70,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
|
||||
class FakeHandler : DelegatingHandler
|
||||
{
|
||||
|
||||
{
|
||||
public DateTime TimeCalled { get; private set; }
|
||||
|
||||
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
|
||||
@ -111,6 +110,5 @@ namespace Ocelot.AcceptanceTests
|
||||
|
||||
_builder.Start();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -159,8 +159,7 @@ namespace Ocelot.AcceptanceTests
|
||||
catch (System.Exception exception)
|
||||
{
|
||||
await context.Response.WriteAsync(exception.StackTrace);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
.Build();
|
||||
|
@ -51,8 +51,7 @@ namespace Ocelot.AcceptanceTests
|
||||
ExceptionsAllowedBeforeBreaking = 1,
|
||||
TimeoutValue = 500,
|
||||
DurationOfBreak = 1000
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -359,8 +359,7 @@ namespace Ocelot.AcceptanceTests
|
||||
catch (System.Exception exception)
|
||||
{
|
||||
await context.Response.WriteAsync(exception.StackTrace);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
.Build();
|
||||
@ -406,4 +405,4 @@ namespace Ocelot.AcceptanceTests
|
||||
_steps.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -144,6 +144,7 @@ namespace Ocelot.AcceptanceTests
|
||||
|
||||
_ocelotClient = _ocelotServer.CreateClient();
|
||||
}
|
||||
|
||||
/*
|
||||
public void GivenIHaveAddedXForwardedForHeader(string value)
|
||||
{
|
||||
|
Reference in New Issue
Block a user