test: fix recipe and audio tests to avoid side effects (#6231)

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Adrian Cole
2025-12-23 10:26:34 +08:00
committed by GitHub
parent 5ca7eb2305
commit 2f876725d3
8 changed files with 186 additions and 187 deletions
+1
View File
@@ -62,3 +62,4 @@ path = "src/bin/generate_schema.rs"
tower = "0.5"
async-trait = "0.1.89"
tempfile = "3.15.0"
env-lock = "1.0.1"
+2
View File
@@ -395,6 +395,8 @@ mod tests {
#[tokio::test(flavor = "multi_thread")]
async fn test_transcribe_endpoint_requires_auth() {
let _guard = env_lock::lock_env([("OPENAI_API_KEY", Some("fake-openai-no-keyring"))]);
let state = AppState::new().await.unwrap();
let app = routes(state);
// Test without auth header