fix(tests): should really centralize these database URLs at some point

This commit is contained in:
perf3ct
2025-07-21 20:38:48 +00:00
parent 0a2020d249
commit 7ee9a4c6a6
6 changed files with 6 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ on:
env:
CARGO_TERM_COLOR: always
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/readur_test
DATABASE_URL: postgresql://readur:readur@localhost:5432/readur
jobs:
integration-tests:

View File

@@ -70,7 +70,7 @@ async fn create_test_app_state() -> Result<Arc<AppState>> {
// Create a test config if env fails - use DATABASE_URL env var or fallback
let database_url = std::env::var("DATABASE_URL")
.or_else(|_| std::env::var("TEST_DATABASE_URL"))
.unwrap_or_else(|_| "postgresql://postgres:postgres@localhost:5432/readur_test".to_string());
.unwrap_or_else(|_| "postgresql://readur:readur@localhost:5432/readur".to_string());
Config {
database_url,
server_address: "127.0.0.1:8000".to_string(),

View File

@@ -13,7 +13,7 @@ async fn create_test_app_state() -> Result<Arc<AppState>> {
let config = Config::from_env().unwrap_or_else(|_| {
let database_url = std::env::var("DATABASE_URL")
.or_else(|_| std::env::var("TEST_DATABASE_URL"))
.unwrap_or_else(|_| "postgresql://postgres:postgres@localhost:5432/readur_test".to_string());
.unwrap_or_else(|_| "postgresql://readur:readur@localhost:5432/readur".to_string());
Config {
database_url,

View File

@@ -35,7 +35,7 @@ impl OCRPipelineTestHarness {
async fn new() -> Result<Self> {
let database_url = std::env::var("TEST_DATABASE_URL")
.or_else(|_| std::env::var("DATABASE_URL"))
.unwrap_or_else(|_| "postgresql://postgres:postgres@localhost:5432/readur_test".to_string());
.unwrap_or_else(|_| "postgresql://readur:readur@localhost:5432/readur".to_string());
// Initialize database connection with higher limits for stress testing
let pool = sqlx::postgres::PgPoolOptions::new()

View File

@@ -116,7 +116,7 @@ async fn create_test_app_state() -> Result<Arc<AppState>> {
let config = Config::from_env().unwrap_or_else(|_| {
let database_url = std::env::var("DATABASE_URL")
.or_else(|_| std::env::var("TEST_DATABASE_URL"))
.unwrap_or_else(|_| "postgresql://postgres:postgres@localhost:5432/readur_test".to_string());
.unwrap_or_else(|_| "postgresql://readur:readur@localhost:5432/readur".to_string());
Config {
database_url,
server_address: "127.0.0.1:8000".to_string(),

View File

@@ -116,7 +116,7 @@ async fn create_test_app_state() -> Result<Arc<AppState>> {
let config = Config::from_env().unwrap_or_else(|_| {
let database_url = std::env::var("DATABASE_URL")
.or_else(|_| std::env::var("TEST_DATABASE_URL"))
.unwrap_or_else(|_| "postgresql://postgres:postgres@localhost:5432/readur_test".to_string());
.unwrap_or_else(|_| "postgresql://readur:readur@localhost:5432/readur".to_string());
Config {
database_url,
server_address: "127.0.0.1:8000".to_string(),