add test which checks instance rate limits working

This commit is contained in:
bitfl0wer 2023-04-15 13:54:33 +02:00
parent 38bf6dd5d1
commit b758246b12
1 changed files with 9 additions and 0 deletions

View File

@ -201,5 +201,14 @@ mod rate_limit {
String::from("http://localhost:3001/cdn"),
);
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
}
);
}
}