mirror of https://github.com/lldap/lldap.git
server: Switch tests to pretty_assertions
This commit is contained in:
parent
1598f096e9
commit
134796aa9f
|
@ -1138,6 +1138,12 @@ dependencies = [
|
|||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diff"
|
||||
version = "0.1.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
|
||||
|
||||
[[package]]
|
||||
name = "difflib"
|
||||
version = "0.4.0"
|
||||
|
@ -2433,6 +2439,7 @@ dependencies = [
|
|||
"nix",
|
||||
"opaque-ke",
|
||||
"orion",
|
||||
"pretty_assertions",
|
||||
"rand 0.8.5",
|
||||
"rand_chacha 0.3.1",
|
||||
"reqwest",
|
||||
|
@ -3127,6 +3134,16 @@ dependencies = [
|
|||
"termtree",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pretty_assertions"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66"
|
||||
dependencies = [
|
||||
"diff",
|
||||
"yansi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-error"
|
||||
version = "1.0.4"
|
||||
|
|
|
@ -134,6 +134,7 @@ features = ["serde"]
|
|||
assert_cmd = "2.0"
|
||||
mockall = "0.11.4"
|
||||
nix = "0.26.2"
|
||||
pretty_assertions = "1"
|
||||
|
||||
[dev-dependencies.graphql_client]
|
||||
features = ["graphql_query_derive", "reqwest-rustls"]
|
||||
|
|
|
@ -211,9 +211,10 @@ pub trait BackendHandler:
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use base64::Engine;
|
||||
|
||||
use super::*;
|
||||
use base64::Engine;
|
||||
use pretty_assertions::assert_ne;
|
||||
|
||||
#[test]
|
||||
fn test_uuid_time() {
|
||||
use chrono::prelude::*;
|
||||
|
|
|
@ -32,6 +32,7 @@ pub mod tests {
|
|||
infra::configuration::ConfigurationBuilder,
|
||||
};
|
||||
use lldap_auth::{opaque, registration};
|
||||
use pretty_assertions::assert_eq;
|
||||
use sea_orm::Database;
|
||||
|
||||
pub fn get_default_config() -> Configuration {
|
||||
|
|
|
@ -154,6 +154,7 @@ impl GroupBackendHandler for SqlBackendHandler {
|
|||
mod tests {
|
||||
use super::*;
|
||||
use crate::domain::{handler::SubStringFilter, sql_backend_handler::tests::*, types::UserId};
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
async fn get_group_ids(
|
||||
handler: &SqlBackendHandler,
|
||||
|
|
|
@ -51,6 +51,7 @@ mod tests {
|
|||
use crate::domain::{
|
||||
handler::AttributeList, sql_backend_handler::tests::*, types::AttributeType,
|
||||
};
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_default_schema() {
|
||||
|
|
|
@ -42,6 +42,7 @@ mod tests {
|
|||
sql_migrations,
|
||||
types::{GroupId, JpegPhoto, Serialized, Uuid},
|
||||
};
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
use super::*;
|
||||
use chrono::prelude::*;
|
||||
|
|
|
@ -371,6 +371,7 @@ mod tests {
|
|||
sql_backend_handler::tests::*,
|
||||
types::{JpegPhoto, UserColumn},
|
||||
};
|
||||
use pretty_assertions::{assert_eq, assert_ne};
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_list_users_no_filter() {
|
||||
|
|
|
@ -569,6 +569,7 @@ pub struct UserAndGroups {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn test_serialized_debug_string() {
|
||||
|
|
|
@ -360,6 +360,7 @@ where
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn check_generated_server_key() {
|
||||
|
|
|
@ -508,6 +508,7 @@ mod tests {
|
|||
RootNode, Variables,
|
||||
};
|
||||
use mockall::predicate::eq;
|
||||
use pretty_assertions::assert_eq;
|
||||
use std::collections::HashSet;
|
||||
|
||||
fn schema<'q, C, Q>(query_root: Q) -> RootNode<'q, Q, EmptyMutation<C>, EmptySubscription<C>>
|
||||
|
|
|
@ -787,6 +787,7 @@ mod tests {
|
|||
use chrono::TimeZone;
|
||||
use ldap3_proto::proto::{LdapDerefAliases, LdapSearchScope, LdapSubstringFilter};
|
||||
use mockall::predicate::eq;
|
||||
use pretty_assertions::assert_eq;
|
||||
use std::collections::HashSet;
|
||||
use tokio;
|
||||
|
||||
|
|
|
@ -191,7 +191,6 @@ impl Drop for LLDAPFixture {
|
|||
|
||||
for _ in 0..10 {
|
||||
let status = self.child.try_wait();
|
||||
if status.is_err() {}
|
||||
match status {
|
||||
Err(e) => {
|
||||
println!(
|
||||
|
|
Loading…
Reference in New Issue