mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
uncomment tests
This commit is contained in:
parent
9cf3ff72a3
commit
03ba830ab2
@ -1400,7 +1400,7 @@ async fn error_patch_api_key_indexes_invalid_parameters() {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn error_access_api_key_routes_no_master_key_set() {
|
||||
let server = Server::new().await;
|
||||
let mut server = Server::new().await;
|
||||
|
||||
let expected_response = json!({
|
||||
"message": "Meilisearch is running without a master key. To access this API endpoint, you must have set a master key at launch.",
|
||||
@ -1430,32 +1430,32 @@ async fn error_access_api_key_routes_no_master_key_set() {
|
||||
assert_eq!(expected_code, code, "{:?}", &response);
|
||||
assert_eq!(response, expected_response);
|
||||
|
||||
// server.use_api_key("MASTER_KEY");
|
||||
server.use_api_key("MASTER_KEY");
|
||||
|
||||
// let expected_response = json!({"message": "The provided API key is invalid.",
|
||||
// "code": "invalid_api_key",
|
||||
// "type": "auth",
|
||||
// "link": "https://docs.meilisearch.com/errors#invalid_api_key"
|
||||
// });
|
||||
// let expected_code = 403;
|
||||
let expected_response = json!({"message": "The provided API key is invalid.",
|
||||
"code": "invalid_api_key",
|
||||
"type": "auth",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_api_key"
|
||||
});
|
||||
let expected_code = 403;
|
||||
|
||||
// let (response, code) = server.add_api_key(json!({})).await;
|
||||
let (response, code) = server.add_api_key(json!({})).await;
|
||||
|
||||
// assert_eq!(expected_code, code, "{:?}", &response);
|
||||
// assert_eq!(response, expected_response);
|
||||
assert_eq!(expected_code, code, "{:?}", &response);
|
||||
assert_eq!(response, expected_response);
|
||||
|
||||
// let (response, code) = server.patch_api_key("content", json!({})).await;
|
||||
let (response, code) = server.patch_api_key("content", json!({})).await;
|
||||
|
||||
// assert_eq!(expected_code, code, "{:?}", &response);
|
||||
// assert_eq!(response, expected_response);
|
||||
assert_eq!(expected_code, code, "{:?}", &response);
|
||||
assert_eq!(response, expected_response);
|
||||
|
||||
// let (response, code) = server.get_api_key("content").await;
|
||||
let (response, code) = server.get_api_key("content").await;
|
||||
|
||||
// assert_eq!(expected_code, code, "{:?}", &response);
|
||||
// assert_eq!(response, expected_response);
|
||||
assert_eq!(expected_code, code, "{:?}", &response);
|
||||
assert_eq!(response, expected_response);
|
||||
|
||||
// let (response, code) = server.list_api_keys().await;
|
||||
let (response, code) = server.list_api_keys().await;
|
||||
|
||||
// assert_eq!(expected_code, code, "{:?}", &response);
|
||||
// assert_eq!(response, expected_response);
|
||||
assert_eq!(expected_code, code, "{:?}", &response);
|
||||
assert_eq!(response, expected_response);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user