chore: get rid of chrono in favor of time

Chrono has been unmaintened for a few month now and there is a CVE on it.

make clippy happy

bump milli
This commit is contained in:
Irevoire 2022-02-14 15:32:41 +01:00
parent 216965e9d9
commit 05c8d81e65
No known key found for this signature in database
GPG key ID: 7A6A970C96104F1B
33 changed files with 369 additions and 226 deletions

View file

@ -1,8 +1,8 @@
use crate::common::{GetAllDocumentsOptions, Server};
use actix_web::test;
use chrono::DateTime;
use meilisearch_http::{analytics, create_app};
use serde_json::{json, Value};
use time::{format_description::well_known::Rfc3339, OffsetDateTime};
/// This is the basic usage of our API and every other tests uses the content-type application/json
#[actix_rt::test]
@ -568,9 +568,9 @@ async fn add_documents_no_index_creation() {
assert_eq!(response["details"]["indexedDocuments"], 1);
let processed_at =
DateTime::parse_from_rfc3339(response["finishedAt"].as_str().unwrap()).unwrap();
OffsetDateTime::parse(response["finishedAt"].as_str().unwrap(), &Rfc3339).unwrap();
let enqueued_at =
DateTime::parse_from_rfc3339(response["enqueuedAt"].as_str().unwrap()).unwrap();
OffsetDateTime::parse(response["enqueuedAt"].as_str().unwrap(), &Rfc3339).unwrap();
assert!(processed_at > enqueued_at);
// index was created, and primary key was infered.