Go back to a compiling state and start running tests again

This commit is contained in:
Antonio Scandurra 2022-11-10 15:24:49 +01:00
parent 90d1d9ac82
commit 1bb41b6f54
4 changed files with 391 additions and 428 deletions

View file

@ -18,7 +18,7 @@ use serde::Deserialize;
use std::{
env::args,
net::{SocketAddr, TcpListener},
path::PathBuf,
path::{Path, PathBuf},
sync::Arc,
time::Duration,
};
@ -101,8 +101,7 @@ async fn main() -> Result<()> {
let migrations_path = config
.migrations_path
.as_deref()
.or(db::DEFAULT_MIGRATIONS_PATH.map(|s| s.as_ref()))
.ok_or_else(|| anyhow!("missing MIGRATIONS_PATH environment variable"))?;
.unwrap_or_else(|| Path::new(concat!(env!("CARGO_MANIFEST_DIR"), "/migrations")));
let migrations = db.migrate(&migrations_path, false).await?;
for (migration, duration) in migrations {