You've already forked AstralRinth
forked from didirus/AstralRinth
Add redis caching to getting user notifications and projects [MOD-540] (#723)
* Add redis caching to getting a user's project ids * Run `cargo sqlx prepare` to update the sqlx-data.json * Add redis caching for getting user notifications * Fix new clippy warnings * Remove log that shouldn't have been committed * Batch insert of notifications (untested) * sqlx prepare... * Fix merge conflict things and use new redis struct * Fix bug with calling delete_many without any elements (caught by tests) * cargo sqlx prepare * Add tests around cache invalidation (and fix bug they caught!) * Some test reorg based on code review suggestions
This commit is contained in:
@@ -83,9 +83,10 @@ impl<'a> ScopeTest<'a> {
|
||||
|
||||
if resp.status().as_u16() != self.expected_failure_code {
|
||||
return Err(format!(
|
||||
"Expected failure code {}, got {}",
|
||||
"Expected failure code {}, got {} ({:#?})",
|
||||
self.expected_failure_code,
|
||||
resp.status().as_u16()
|
||||
resp.status().as_u16(),
|
||||
resp.response()
|
||||
));
|
||||
}
|
||||
|
||||
@@ -106,8 +107,9 @@ impl<'a> ScopeTest<'a> {
|
||||
|
||||
if !(resp.status().is_success() || resp.status().is_redirection()) {
|
||||
return Err(format!(
|
||||
"Expected success code, got {}",
|
||||
resp.status().as_u16()
|
||||
"Expected success code, got {} ({:#?})",
|
||||
resp.status().as_u16(),
|
||||
resp.response()
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user