tsk-50: Create Special endpoint for services to obtain a token #53

Merged
phoenix merged 19 commits from tsk-50 into devel 2025-08-03 23:09:51 +00:00
Showing only changes of commit 503a1b98b4 - Show all commits

View File

@@ -112,15 +112,6 @@ mod tests {
Ok(())
}
pub async fn migrations(pool: &sqlx::PgPool) {
// Run migrations using the sqlx::migrate! macro
// Assumes your migrations are in a ./migrations folder relative to Cargo.toml
sqlx::migrate!("./test_migrations")
.run(pool)
.await
.expect("Failed to run migrations");
}
pub async fn get_database_name() -> Result<String, Box<dyn std::error::Error>> {
let database_url = icarus_envy::environment::get_db_url().await;
@@ -203,7 +194,7 @@ mod tests {
let pool = db_mgr::connect_to_db(&db_name).await.unwrap();
db_mgr::migrations(&pool).await;
icarus_auth::db::migrations(&pool).await;
let app = init::routes().await.layer(axum::Extension(pool));
@@ -287,7 +278,7 @@ mod tests {
let pool = db_mgr::connect_to_db(&db_name).await.unwrap();
db_mgr::migrations(&pool).await;
icarus_auth::db::migrations(&pool).await;
let app = init::routes().await.layer(axum::Extension(pool));