fix: update test config for session_secret removal and Arc master key

Remove session_secret field (no longer in AppConfig), wrap
master_encryption_key in Arc<String>, and pass a generated job_id
to db::syntheses::create which now requires it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
master
oabrivard 3 months ago
parent 1f8f2ddc9d
commit ecf95ffe35

@ -107,8 +107,7 @@ impl TestApp {
// Build a test config with bypassed external services // Build a test config with bypassed external services
let config = AppConfig { let config = AppConfig {
database_url: test_db_url, database_url: test_db_url,
session_secret: "a".repeat(64), master_encryption_key: std::sync::Arc::new("ab".repeat(32)), // 64 hex chars
master_encryption_key: "ab".repeat(32), // 64 hex chars
app_url: "http://localhost:3000".into(), app_url: "http://localhost:3000".into(),
port: 0, port: 0,
static_dir: "/tmp/ai_synth_test_static".into(), // not used in API tests static_dir: "/tmp/ai_synth_test_static".into(), // not used in API tests
@ -430,7 +429,7 @@ impl TestApp {
week: &str, week: &str,
sections_json: &serde_json::Value, sections_json: &serde_json::Value,
) -> uuid::Uuid { ) -> uuid::Uuid {
let row = db::syntheses::create(&self.pool, user_id, week, sections_json) let row = db::syntheses::create(&self.pool, user_id, week, sections_json, uuid::Uuid::new_v4())
.await .await
.expect("Failed to insert test synthesis"); .expect("Failed to insert test synthesis");
row.id row.id

Loading…
Cancel
Save