mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Merge #90
90: restore version route r=MarinPostma a=MarinPostma close #74 Co-authored-by: mpostma <postma.marin@protonmail.com>
This commit is contained in:
commit
c6dbd81823
6 changed files with 24 additions and 3 deletions
|
@ -69,4 +69,8 @@ impl Server {
|
|||
pub async fn list_indexes(&self) -> (Value, StatusCode) {
|
||||
self.service.get("/indexes").await
|
||||
}
|
||||
|
||||
pub async fn version(&self) -> (Value, StatusCode) {
|
||||
self.service.get("/version").await
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ mod index;
|
|||
mod search;
|
||||
mod settings;
|
||||
mod updates;
|
||||
mod stats;
|
||||
|
||||
// Tests are isolated by features in different modules to allow better readability, test
|
||||
// targetability, and improved incremental compilation times.
|
||||
|
|
12
meilisearch-http/tests/stats/mod.rs
Normal file
12
meilisearch-http/tests/stats/mod.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
use crate::common::Server;
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn get_settings_unexisting_index() {
|
||||
let server = Server::new().await;
|
||||
let (response, code) = server.version().await;
|
||||
assert_eq!(code, 200);
|
||||
let version = response.as_object().unwrap();
|
||||
assert!(version.get("commitSha").is_some());
|
||||
assert!(version.get("buildDate").is_some());
|
||||
assert!(version.get("pkgVersion").is_some());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue