mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
Fix tests
This commit is contained in:
14
src/main.rs
14
src/main.rs
@@ -1,20 +1,20 @@
|
|||||||
use crate::config::Config;
|
use crate::config::Config;
|
||||||
use actix_web::http::KeepAlive;
|
|
||||||
use actix_web::HttpServer;
|
use actix_web::HttpServer;
|
||||||
|
use actix_web::http::KeepAlive;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use app::make_app;
|
use app::make_app;
|
||||||
use clap::{Parser, Subcommand};
|
use clap::{Parser, Subcommand};
|
||||||
use commands::{cmd_gen_config, cmd_pwhash};
|
use commands::{cmd_gen_config, cmd_pwhash};
|
||||||
use config::{DataStoreConfig, SqliteDataStoreConfig};
|
use config::{DataStoreConfig, SqliteDataStoreConfig};
|
||||||
use figment::providers::{Env, Format, Toml};
|
|
||||||
use figment::Figment;
|
use figment::Figment;
|
||||||
|
use figment::providers::{Env, Format, Toml};
|
||||||
use rustical_dav::push::push_notifier;
|
use rustical_dav::push::push_notifier;
|
||||||
use rustical_nextcloud_login::NextcloudFlows;
|
use rustical_nextcloud_login::NextcloudFlows;
|
||||||
use rustical_store::auth::TomlPrincipalStore;
|
use rustical_store::auth::TomlPrincipalStore;
|
||||||
use rustical_store::{AddressbookStore, CalendarStore, CollectionOperation, SubscriptionStore};
|
use rustical_store::{AddressbookStore, CalendarStore, CollectionOperation, SubscriptionStore};
|
||||||
use rustical_store_sqlite::addressbook_store::SqliteAddressbookStore;
|
use rustical_store_sqlite::addressbook_store::SqliteAddressbookStore;
|
||||||
use rustical_store_sqlite::calendar_store::SqliteCalendarStore;
|
use rustical_store_sqlite::calendar_store::SqliteCalendarStore;
|
||||||
use rustical_store_sqlite::{create_db_pool, SqliteStore};
|
use rustical_store_sqlite::{SqliteStore, create_db_pool};
|
||||||
use setup_tracing::setup_tracing;
|
use setup_tracing::setup_tracing;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use tokio::sync::mpsc::Receiver;
|
use tokio::sync::mpsc::Receiver;
|
||||||
@@ -163,6 +163,13 @@ mod tests {
|
|||||||
) -> Result<(), rustical_store::Error> {
|
) -> Result<(), rustical_store::Error> {
|
||||||
Err(rustical_store::Error::Other(anyhow!("Not implemented")))
|
Err(rustical_store::Error::Other(anyhow!("Not implemented")))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn insert_principal(
|
||||||
|
&self,
|
||||||
|
user: rustical_store::auth::User,
|
||||||
|
) -> Result<(), rustical_store::Error> {
|
||||||
|
Err(rustical_store::Error::Other(anyhow!("Not implemented")))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
@@ -186,6 +193,7 @@ mod tests {
|
|||||||
FrontendConfig {
|
FrontendConfig {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
secret_key: generate_frontend_secret(),
|
secret_key: generate_frontend_secret(),
|
||||||
|
oidc: None,
|
||||||
},
|
},
|
||||||
NextcloudLoginConfig { enabled: false },
|
NextcloudLoginConfig { enabled: false },
|
||||||
Arc::new(NextcloudFlows::default()),
|
Arc::new(NextcloudFlows::default()),
|
||||||
|
|||||||
Reference in New Issue
Block a user