release_checker/test_console/src/main.rs

22 lines
816 B
Rust

/*
I use this as a test bench instead of running the binary from a terminal.
TODO: i might change this to a test, that is muted somehow, but through configuration can be wired
to a real SMTP server, so i can test the full flow of the binary
*/
fn main() {
let parser = ArgumentParser {};
let settings = Settings::new(None).unwrap();
let console = Console {};
let notification = EmailNotification {
smtp_relay: settings.email.smtp_relay.clone(),
smtp_username: settings.email.smtp_username.clone(),
smtp_password: settings.email.smtp_password.clone(),
from: settings.email.from.clone(),
};
let args = std::env::args().collect();
let application = Application::new(&settings, &console, &notification, parser, args);
application.run();
}