Merge remote-tracking branch 'refs/remotes/origin/develop' into RateLimit

# Conflicts:
#	src/Ocelot/Configuration/Builder/ReRouteBuilder.cs
#	src/Ocelot/Configuration/Creator/FileOcelotConfigurationCreator.cs
#	src/Ocelot/Configuration/QoSOptions.cs
#	src/Ocelot/Configuration/ReRoute.cs
#	test/Ocelot.AcceptanceTests/configuration.json
This commit is contained in:
geffzhang
2017-02-15 08:49:40 +08:00
83 changed files with 1854 additions and 345 deletions

View File

@ -72,6 +72,7 @@ namespace Ocelot.UnitTests.RateLimit
var downstreamRoute = new DownstreamRoute(new List<Ocelot.DownstreamRouteFinder.UrlMatcher.UrlPathPlaceholderNameAndValue>(),
new ReRouteBuilder().WithEnableRateLimiting(true).WithRateLimitOptions(
new Ocelot.Configuration.RateLimitOptions(true, "ClientId", new List<string>(), false, "", "", new Ocelot.Configuration.RateLimitRule("1s", TimeSpan.FromSeconds(100), 3), 429))
.WithUpstreamHttpMethod("Get")
.Build());
this.Given(x => x.GivenTheDownStreamRouteIs(downstreamRoute))
@ -88,6 +89,7 @@ namespace Ocelot.UnitTests.RateLimit
var downstreamRoute = new DownstreamRoute(new List<Ocelot.DownstreamRouteFinder.UrlMatcher.UrlPathPlaceholderNameAndValue>(),
new ReRouteBuilder().WithEnableRateLimiting(true).WithRateLimitOptions(
new Ocelot.Configuration.RateLimitOptions(true, "ClientId", new List<string>() { "ocelotclient2" }, false, "", "", new RateLimitRule( "1s", TimeSpan.FromSeconds(100),3),429))
.WithUpstreamHttpMethod("Get")
.Build());
this.Given(x => x.GivenTheDownStreamRouteIs(downstreamRoute))