Add test code

This commit is contained in:
Quentin 2022-06-03 14:11:00 +02:00
parent 43f443c7a8
commit 5b3b2955fc
Signed by: quentin
GPG Key ID: E9602264D639FF68
1 changed files with 6 additions and 3 deletions

View File

@ -145,12 +145,15 @@ impl Server {
pub async fn run(self: Self) -> Result<()> {
tracing::info!("Starting server on {:#}", self.incoming.local_addr);
let creds = self.mailstore.login_provider.login("quentin", "poupou").await?;
let mut mailbox = Mailbox::new(&creds, "TestMailbox".to_string()).await?;
mailbox.test().await?;
let server = ImapServer::new(self.incoming).serve(Instance::new(self.mailstore.clone()));
let _ = server.await?;
/*let creds = self.login_provider.login("quentin", "poupou").await?;
let mut mailbox = Mailbox::new(&creds, "TestMailbox".to_string()).await?;
mailbox.test().await?;*/
Ok(())
}