Fix tests

remove_settings_and_secret_singletons
Dessalines 2021-09-22 16:39:30 -04:00
parent 789b8e11c1
commit e85a2b7467
1 changed files with 4 additions and 4 deletions

View File

@ -43,10 +43,6 @@ async fn main() -> Result<(), LemmyError> {
.build(manager)
.unwrap_or_else(|_| panic!("Error connecting to {}", db_url));
// Initialize the secrets
let conn = pool.get()?;
let secret = Secret::init(&conn).expect("Couldn't initialize secrets.");
// Run the migrations from code
let protocol_and_hostname = settings.get_protocol_and_hostname();
blocking(&pool, move |conn| {
@ -67,6 +63,10 @@ async fn main() -> Result<(), LemmyError> {
rate_limit_config: settings.rate_limit.to_owned().unwrap_or_default(),
};
// Initialize the secrets
let conn = pool.get()?;
let secret = Secret::init(&conn).expect("Couldn't initialize secrets.");
println!(
"Starting http server at {}:{}",
settings.bind, settings.port