uuid resolver hard state

This commit is contained in:
mpostma 2021-03-10 18:04:20 +01:00
parent a56e8c1a0c
commit 53cf500e36
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
7 changed files with 161 additions and 49 deletions

View file

@ -73,7 +73,7 @@ impl Index<'_> {
let url = format!("/indexes/{}/updates/{}", self.uid, update_id);
for _ in 0..10 {
let (response, status_code) = self.service.get(&url).await;
assert_eq!(status_code, 200);
assert_eq!(status_code, 200, "response: {}", response);
if response["status"] == "processed" || response["status"] == "failed" {
return response;
@ -84,8 +84,8 @@ impl Index<'_> {
panic!("Timeout waiting for update id");
}
pub async fn get_update(&self, udpate_id: u64) -> (Value, StatusCode) {
let url = format!("/indexes/{}/updates/{}", self.uid, udpate_id);
pub async fn get_update(&self, update_id: u64) -> (Value, StatusCode) {
let url = format!("/indexes/{}/updates/{}", self.uid, update_id);
self.service.get(url).await
}

View file

@ -8,7 +8,7 @@ async fn get_update_unexisting_index() {
}
#[actix_rt::test]
async fn get_unexisting_udpate_status() {
async fn get_unexisting_update_status() {
let server = Server::new().await;
let index = server.index("test");
index.create(None).await;