Nats + Redis PubSub cluster updates replacing Gossip protocol
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
use crate::{
|
||||
AssertConfig, add_test_certs, directory::internal::TestInternalDirectory,
|
||||
AssertConfig, TEST_USERS, add_test_certs, directory::internal::TestInternalDirectory,
|
||||
jmap::assert_is_empty, store::TempDir,
|
||||
};
|
||||
use ::managesieve::core::ManageSieveSessionManager;
|
||||
@@ -133,7 +133,7 @@ async fn init_webdav_tests(store_id: &str, delete_if_exists: bool) -> WebDavTest
|
||||
let cache = Caches::parse(&mut config);
|
||||
|
||||
let store = core.storage.data.clone();
|
||||
let (ipc, mut ipc_rxs) = build_ipc(&mut config);
|
||||
let (ipc, mut ipc_rxs) = build_ipc(&mut config, false);
|
||||
let inner = Arc::new(Inner {
|
||||
shared_core: core.into_shared(),
|
||||
data,
|
||||
@@ -194,7 +194,7 @@ async fn init_webdav_tests(store_id: &str, delete_if_exists: bool) -> WebDavTest
|
||||
|
||||
// Create test accounts
|
||||
let mut clients = AHashMap::new();
|
||||
for (account, secret, name, email) in TEST_DAV_USERS {
|
||||
for (account, secret, name, email) in TEST_USERS {
|
||||
let account_id = store
|
||||
.create_test_user(account, secret, name, &[email])
|
||||
.await;
|
||||
@@ -1127,16 +1127,3 @@ ansi = true
|
||||
disabled-events = ["network.*"]
|
||||
|
||||
"#;
|
||||
|
||||
pub const TEST_DAV_USERS: &[(&str, &str, &str, &str)] = &[
|
||||
("admin", "secret1", "Superuser", "admin@example,com"),
|
||||
("john", "secret2", "John Doe", "jdoe@example.com"),
|
||||
(
|
||||
"jane",
|
||||
"secret3",
|
||||
"Jane Doe-Smith",
|
||||
"jane.smith@example.com",
|
||||
),
|
||||
("bill", "secret4", "Bill Foobar", "bill@example,com"),
|
||||
("mike", "secret5", "Mike Noquota", "mike@example,com"),
|
||||
];
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
use super::WebDavTest;
|
||||
use crate::webdav::{TEST_DAV_USERS, prop::ALL_DAV_PROPERTIES};
|
||||
use crate::{TEST_USERS, webdav::prop::ALL_DAV_PROPERTIES};
|
||||
use dav_proto::schema::property::{DavProperty, PrincipalProperty, WebDavProperty};
|
||||
use groupware::DavResourceName;
|
||||
use hyper::StatusCode;
|
||||
@@ -23,7 +23,7 @@ pub async fn test(test: &WebDavTest) {
|
||||
ALL_DAV_PROPERTIES,
|
||||
)
|
||||
.await;
|
||||
for (account, _, name, _) in TEST_DAV_USERS {
|
||||
for (account, _, name, _) in TEST_USERS {
|
||||
let props = response.properties(&format!(
|
||||
"{}/{}/",
|
||||
DavResourceName::Principal.base_path(),
|
||||
@@ -174,7 +174,7 @@ pub async fn test(test: &WebDavTest) {
|
||||
.with_values([format!("D:href:{}/jane/", DavResourceName::Card.base_path()).as_str()])
|
||||
.with_status(StatusCode::OK);
|
||||
|
||||
for (account, _, name, _) in TEST_DAV_USERS
|
||||
for (account, _, name, _) in TEST_USERS
|
||||
.iter()
|
||||
.filter(|(account, _, _, _)| ["jane", "support"].contains(account))
|
||||
{
|
||||
@@ -310,7 +310,7 @@ pub async fn test(test: &WebDavTest) {
|
||||
response
|
||||
.properties(&format!("{}/jane/", DavResourceName::Principal.base_path()))
|
||||
.get(DavProperty::WebDav(WebDavProperty::DisplayName))
|
||||
.with_values([TEST_DAV_USERS
|
||||
.with_values([TEST_USERS
|
||||
.iter()
|
||||
.find(|(account, _, _, _)| *account == "jane")
|
||||
.unwrap()
|
||||
|
||||
Reference in New Issue
Block a user