Database schema optimization - part 12
This commit is contained in:
@@ -4,7 +4,10 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
||||
*/
|
||||
|
||||
use crate::directory::{DirectoryTest, IntoTestPrincipal, TestPrincipal};
|
||||
use crate::{
|
||||
directory::{DirectoryTest, IntoTestPrincipal, TestPrincipal},
|
||||
store::cleanup::store_destroy,
|
||||
};
|
||||
use ahash::AHashSet;
|
||||
use directory::{
|
||||
Permission, QueryBy, QueryParams, Type,
|
||||
@@ -30,7 +33,7 @@ async fn internal_directory() {
|
||||
|
||||
for (store_id, store) in config.stores.stores {
|
||||
println!("Testing internal directory with store {:?}", store_id);
|
||||
store.destroy().await;
|
||||
store_destroy(&store).await;
|
||||
|
||||
// A principal without name should fail
|
||||
assert_eq!(
|
||||
|
||||
@@ -13,8 +13,9 @@ use mail_send::Credentials;
|
||||
#[allow(unused_imports)]
|
||||
use store::{InMemoryStore, Store};
|
||||
|
||||
use crate::directory::{
|
||||
DirectoryTest, IntoTestPrincipal, TestPrincipal, map_account_id, map_account_ids,
|
||||
use crate::{
|
||||
directory::{DirectoryTest, IntoTestPrincipal, TestPrincipal, map_account_id, map_account_ids},
|
||||
store::cleanup::store_destroy,
|
||||
};
|
||||
|
||||
use super::DirectoryStore;
|
||||
@@ -43,7 +44,7 @@ async fn sql_directory() {
|
||||
let core = config.server;
|
||||
|
||||
// Create tables
|
||||
base_store.destroy().await;
|
||||
store_destroy(base_store).await;
|
||||
store.create_test_directory().await;
|
||||
|
||||
// Create test users
|
||||
|
||||
Reference in New Issue
Block a user