this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

test: Enhance database setup tests for better error handling

+10 -7
+7 -5
mise/tasks/check.toml
··· 24 24 run = "watchexec -c clear -restart -e rs,toml 'clear ; cargo clippy'" 25 25 26 26 27 - [test] 27 + [local-devel-test] 28 + alias = "test" 28 29 description = "Run the check command on both server and client." 29 30 run = { tasks = ["check-server", "check-client"] } 30 31 31 - [test-server] 32 + [local-devel-test-server] 32 33 depends = ["build-client"] 33 34 hide = true 34 35 run = "cargo test" 35 36 dir = "./server" 36 - 37 - [test-client] 37 + env.LUMINA_POSTGRES_PASSWORD="lumina_pw" 38 + 39 + [local-devel-test-client] 38 40 hide = true 39 41 run = "gleam test" 40 42 dir = "./client/" 41 43 42 - [test-watch] 44 + [local-devel-test-watch] 43 45 tools.watchexec = "latest" 44 46 description = "Run the server in development mode with file watching" 45 47 run = "mise watch --restart -e rs,gleam,toml,css,ts,json --clear=clear test"
+3 -2
server/src/tests.rs
··· 23 23 24 24 #[tokio::test] 25 25 async fn test_database_setup() { 26 - let result = database::setup().await; 27 - assert!(result.is_ok(), "Database setup should succeed"); 26 + let result = database::setup().await.expect("Database setup should succeed."); 27 + assert!(result.get_postgres_pool().get().await.is_ok(), "Should get Postgres connection"); 28 + assert!(result.get_redis_pool().get().await.is_ok(), "Should get Redis connection"); 28 29 } 29 30 30 31 #[tokio::test]