From 1dcd6cd1abb0c7c755c5cdbf1d3f712f32b4fe57 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 20 Jul 2026 15:57:33 +0000 Subject: [PATCH] chore(alerts): drop orphaned cache entry and unrelated fmt churn Remove the sqlx cache file for the test query deleted when the gate-alert fixture was rewritten, and revert cargo fmt reformatting of three unrelated test files. --- ...6682d411e7a3daf8f832e0aa811a2d8265f9c.json | 14 -------- backend/tests/drafts_nul.rs | 35 ++++++++++--------- backend/tests/script_auto_kind_failure.rs | 4 ++- backend/tests/workspace_export.rs | 1 + 4 files changed, 23 insertions(+), 31 deletions(-) delete mode 100644 backend/.sqlx/query-95e7660c83e6f0d7b1807684ac26682d411e7a3daf8f832e0aa811a2d8265f9c.json diff --git a/backend/.sqlx/query-95e7660c83e6f0d7b1807684ac26682d411e7a3daf8f832e0aa811a2d8265f9c.json b/backend/.sqlx/query-95e7660c83e6f0d7b1807684ac26682d411e7a3daf8f832e0aa811a2d8265f9c.json deleted file mode 100644 index 25506d542f..0000000000 --- a/backend/.sqlx/query-95e7660c83e6f0d7b1807684ac26682d411e7a3daf8f832e0aa811a2d8265f9c.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE v2_job_queue SET canceled_by = 'canceller'\n WHERE tag = $1 AND canceled_by IS NULL", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [] - }, - "hash": "95e7660c83e6f0d7b1807684ac26682d411e7a3daf8f832e0aa811a2d8265f9c" -} diff --git a/backend/tests/drafts_nul.rs b/backend/tests/drafts_nul.rs index 0afc34717d..d7314b8fb6 100644 --- a/backend/tests/drafts_nul.rs +++ b/backend/tests/drafts_nul.rs @@ -28,16 +28,18 @@ async fn test_draft_write_strips_nul(db: Pool) -> anyhow::Result<()> { let base = format!("http://localhost:{port}/api/w/dnul-ws"); // Save a draft whose summary and content carry a real NUL. - let resp = authed(client().post(format!("{base}/drafts/update/script/u/dnul-admin/poison"))) - .json(&json!({ - "value": { - "summary": "hi\u{0}there", - "path": "u/dnul-admin/poison", - "content": "x\u{0}y" - } - })) - .send() - .await?; + let resp = authed(client().post(format!( + "{base}/drafts/update/script/u/dnul-admin/poison" + ))) + .json(&json!({ + "value": { + "summary": "hi\u{0}there", + "path": "u/dnul-admin/poison", + "content": "x\u{0}y" + } + })) + .send() + .await?; assert_eq!( resp.status(), 200, @@ -46,12 +48,13 @@ async fn test_draft_write_strips_nul(db: Pool) -> anyhow::Result<()> { ); // The stored value must be NUL-free (sanitized on write). - let stored: Value = - authed(client().get(format!("{base}/drafts/get_own/script/u/dnul-admin/poison"))) - .send() - .await? - .json() - .await?; + let stored: Value = authed(client().get(format!( + "{base}/drafts/get_own/script/u/dnul-admin/poison" + ))) + .send() + .await? + .json() + .await?; let value = stored.get("value").expect("draft should exist"); assert_eq!(value["summary"], "hithere"); assert_eq!(value["content"], "xy"); diff --git a/backend/tests/script_auto_kind_failure.rs b/backend/tests/script_auto_kind_failure.rs index 3ce9c0195d..05d22e75ec 100644 --- a/backend/tests/script_auto_kind_failure.rs +++ b/backend/tests/script_auto_kind_failure.rs @@ -85,7 +85,9 @@ async fn failure_kind_script_without_main_is_not_marked_lib( /// (so it stays hidden from the regular script picker). Guards against an /// over-broad sanitizer accidentally clearing the value for plain scripts. #[sqlx::test(fixtures("base"))] -async fn regular_script_without_main_is_still_marked_lib(db: Pool) -> anyhow::Result<()> { +async fn regular_script_without_main_is_still_marked_lib( + db: Pool, +) -> anyhow::Result<()> { let (client, _port, _s) = init_client(db.clone()).await; client diff --git a/backend/tests/workspace_export.rs b/backend/tests/workspace_export.rs index 8a1ee8608a..ca988562fd 100644 --- a/backend/tests/workspace_export.rs +++ b/backend/tests/workspace_export.rs @@ -195,3 +195,4 @@ async fn test_tarball_export_all_tables(db: Pool) -> anyhow::Result<() Ok(()) } +