add test which checks instance rate limits working
This commit is contained in:
parent
38bf6dd5d1
commit
b758246b12
|
@ -201,5 +201,14 @@ mod rate_limit {
|
||||||
String::from("http://localhost:3001/cdn"),
|
String::from("http://localhost:3001/cdn"),
|
||||||
);
|
);
|
||||||
let requester = LimitedRequester::new(urls.api).await;
|
let requester = LimitedRequester::new(urls.api).await;
|
||||||
|
assert_eq!(
|
||||||
|
requester.limits_rate.get(&LimitType::Ip).unwrap(),
|
||||||
|
&Limit {
|
||||||
|
bucket: LimitType::Ip,
|
||||||
|
limit: 500,
|
||||||
|
remaining: 500,
|
||||||
|
reset: 5
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue