restore test

This commit is contained in:
mpostma 2021-02-24 13:35:56 +01:00
parent 4552c42f88
commit 7d2ae9089e
No known key found for this signature in database
GPG Key ID: CBC8A7C1D7A28C3A
2 changed files with 5 additions and 12 deletions

View File

@ -112,17 +112,12 @@ impl IndexController for LocalIndexController {
.map(UpdateStatus::from)
.into_iter()
.chain(pending.
filter_map(|p| p.ok())
// if an update is processing, filter out this update from the pending
filter_map(Result::ok)
// If an update is processing, filter out this update from the pending
// updates.
.filter(|(_, u)| {
println!("processing: {:?}", processing_id);
processing_id
.map(|id| {
println!("id: {}, pending: {}", id, u.id());
id != u.id()
})
.unwrap_or(true)})
.filter(|(_, u)| processing_id
.map(|id| id != u.id())
.unwrap_or(true))
.map(|(_, u)| UpdateStatus::from(u)))
.chain(aborted.filter_map(Result::ok).map(|(_, u)| UpdateStatus::from(u)))
.chain(processed.filter_map(Result::ok).map(|(_, u)| UpdateStatus::from(u)))

View File

@ -50,9 +50,7 @@ async fn list_no_updates() {
assert!(response.as_array().unwrap().is_empty());
}
// TODO: fix #32
#[actix_rt::test]
#[ignore]
async fn list_updates() {
let server = Server::new().await;
let index = server.index("test");