mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-11 15:47:09 -07:00
Added RateLimit service to globally manager short duration ratelimits.
This commit is contained in:
parent
fac6b05bb4
commit
78ade3250c
14 changed files with 218 additions and 250 deletions
|
@ -9,6 +9,7 @@ using NzbDrone.Common.Http;
|
|||
using NzbDrone.Test.Common;
|
||||
using NzbDrone.Test.Common.Categories;
|
||||
using NLog;
|
||||
using NzbDrone.Common.TPL;
|
||||
|
||||
namespace NzbDrone.Common.Test.Http
|
||||
{
|
||||
|
@ -20,6 +21,7 @@ namespace NzbDrone.Common.Test.Http
|
|||
public void SetUp()
|
||||
{
|
||||
Mocker.SetConstant<ICacheManager>(Mocker.Resolve<CacheManager>());
|
||||
Mocker.SetConstant<IRateLimitService>(Mocker.Resolve<RateLimitService>());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -140,7 +142,7 @@ namespace NzbDrone.Common.Test.Http
|
|||
var oldRequest = new HttpRequest("http://eu.httpbin.org/get");
|
||||
oldRequest.AddCookie("my", "cookie");
|
||||
|
||||
var oldClient = new HttpClient(Mocker.Resolve<ICacheManager>(), Mocker.Resolve<Logger>());
|
||||
var oldClient = new HttpClient(Mocker.Resolve<ICacheManager>(), Mocker.Resolve<IRateLimitService>(), Mocker.Resolve<Logger>());
|
||||
|
||||
oldClient.Should().NotBeSameAs(Subject);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue