This commit is contained in:
Maurus Decimus
2026-04-20 17:50:58 +02:00
parent 1edd85486b
commit 3ad4aa82cb
43 changed files with 337 additions and 1201 deletions

View File

@@ -14,6 +14,7 @@ use registry::schema::structs::{Account, AccountSettings, Directory};
use types::id::Id;
pub async fn test() {
println!("Running directory integration tests...");
let test = TestServerBuilder::new("directory_integration_test")
.await
.with_default_listeners()

View File

@@ -11,6 +11,7 @@ use registry::{
};
pub async fn test() {
println!("Running LDAP directory tests...");
let mut config = ldap_test_directory();
// Test bind authentication
@@ -156,6 +157,7 @@ pub fn ldap_test_directory() -> structs::LdapDirectory {
.into(),
group_class: "groupOfNames".into(),
bind_authentication: true,
description: "Test LDAP directory".into(),
..Default::default()
}
}

View File

@@ -12,6 +12,7 @@ use directory::{Account, Credentials, Directory, backend::oidc::OpenIdDirectory}
use registry::{schema::structs, types::map::Map};
pub async fn test() {
println!("Running OIDC directory tests...");
let config = structs::OidcDirectory {
description: "Test OIDC directory".to_string(),
issuer_url: "http://localhost:9080/realms/stalwart".to_string(),

View File

@@ -9,6 +9,7 @@ use registry::schema::structs::{self, SqlAuthStore};
use store::{Store, backend::sqlite::SqliteStore};
pub async fn test() {
println!("Running SQL directory tests...");
let sql_store = Store::SQLite(SqliteStore::open_memory().unwrap().into());
// Create test directory

View File

@@ -12,6 +12,7 @@ use registry::schema::{
use types::id::Id;
pub async fn test() {
println!("Running directory synchronization tests...");
let test = TestServerBuilder::new("directory_synchronization_test")
.await
.with_default_listeners()