Fix tests

This commit is contained in:
Dessalines 2021-09-22 16:39:30 -04:00
parent 789b8e11c1
commit e85a2b7467

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