add the front end tests on the batches routes

This commit is contained in:
Tamo 2024-11-19 15:05:34 +01:00
parent 62646af7b9
commit f1d38581e5
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
6 changed files with 1157 additions and 0 deletions

View file

@ -330,6 +330,10 @@ impl<State> Server<State> {
self.service.get(format!("/tasks?{}", filter)).await
}
pub async fn batches_filter(&self, filter: &str) -> (Value, StatusCode) {
self.service.get(format!("/batches?{}", filter)).await
}
pub async fn version(&self) -> (Value, StatusCode) {
self.service.get("/version").await
}
@ -376,6 +380,11 @@ impl<State> Server<State> {
self.service.get(url).await
}
pub async fn get_batch(&self, batch_id: u32) -> (Value, StatusCode) {
let url = format!("/batches/{}", batch_id);
self.service.get(url).await
}
pub async fn get_features(&self) -> (Value, StatusCode) {
self.service.get("/experimental-features").await
}