mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 16:28:17 +08:00
Rename all ReRoute to Route to move closer to YARP +semver: breaking
This commit is contained in:
@ -7,8 +7,8 @@
|
||||
using Ocelot.Cache.CacheManager;
|
||||
using Ocelot.Cache.Middleware;
|
||||
using Ocelot.Configuration;
|
||||
using Ocelot.Configuration.Builder;
|
||||
using Ocelot.DownstreamRouteFinder.Middleware;
|
||||
using Ocelot.Configuration.Builder;
|
||||
using Ocelot.DownstreamRouteFinder.Middleware;
|
||||
using Ocelot.Logging;
|
||||
using Ocelot.Middleware;
|
||||
using Shouldly;
|
||||
@ -42,7 +42,7 @@
|
||||
x.WithDictionaryHandle();
|
||||
});
|
||||
_cacheManager = new OcelotCacheManagerCache<CachedResponse>(cacheManagerOutputCache);
|
||||
_cacheKeyGenerator = new CacheKeyGenerator();
|
||||
_cacheKeyGenerator = new CacheKeyGenerator();
|
||||
_httpContext.Items.UpsertDownstreamRequest(new Ocelot.Request.Middleware.DownstreamRequest(new HttpRequestMessage(HttpMethod.Get, "https://some.url/blah?abcd=123")));
|
||||
_next = context => Task.CompletedTask;
|
||||
_middleware = new OutputCacheMiddleware(_next, _loggerFactory.Object, _cacheManager, _cacheKeyGenerator);
|
||||
@ -85,13 +85,13 @@
|
||||
|
||||
private void GivenTheDownstreamRouteIs()
|
||||
{
|
||||
var reRoute = new DownstreamReRouteBuilder()
|
||||
var route = new DownstreamRouteBuilder()
|
||||
.WithIsCached(true)
|
||||
.WithCacheOptions(new CacheOptions(100, "kanken"))
|
||||
.WithUpstreamHttpMethod(new List<string> { "Get" })
|
||||
.Build();
|
||||
|
||||
_httpContext.Items.UpsertDownstreamReRoute(reRoute);
|
||||
.Build();
|
||||
|
||||
_httpContext.Items.UpsertDownstreamRoute(route);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user