mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-24 16:01:42 +00:00
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.
This commit is contained in:
-14
@@ -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"
|
||||
}
|
||||
+19
-16
@@ -28,16 +28,18 @@ async fn test_draft_write_strips_nul(db: Pool<Postgres>) -> 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<Postgres>) -> 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");
|
||||
|
||||
@@ -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<Postgres>) -> anyhow::Result<()> {
|
||||
async fn regular_script_without_main_is_still_marked_lib(
|
||||
db: Pool<Postgres>,
|
||||
) -> anyhow::Result<()> {
|
||||
let (client, _port, _s) = init_client(db.clone()).await;
|
||||
|
||||
client
|
||||
|
||||
@@ -195,3 +195,4 @@ async fn test_tarball_export_all_tables(db: Pool<Postgres>) -> anyhow::Result<()
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user