chore: revert unrelated rustfmt churn in windmill-common tests

This commit is contained in:
hugocasa
2026-08-28 18:43:06 +02:00
parent 4def733ff7
commit 322125bafe
2 changed files with 9 additions and 32 deletions
@@ -28,7 +28,8 @@
#[cfg(all(feature = "private", feature = "enterprise"))]
mod tests {
use windmill_common::secret_backend::{
test_aws_sm_connection, AwsSecretsManagerBackend, AwsSecretsManagerSettings, SecretBackend,
test_aws_sm_connection, AwsSecretsManagerBackend, AwsSecretsManagerSettings,
SecretBackend,
};
fn should_run_aws_sm_tests() -> bool {
@@ -80,16 +81,10 @@ mod tests {
.set_secret("test-ws", "u/admin/my_secret", "super-secret-value")
.await
.unwrap();
let value = backend
.get_secret("test-ws", "u/admin/my_secret")
.await
.unwrap();
let value = backend.get_secret("test-ws", "u/admin/my_secret").await.unwrap();
assert_eq!(value, "super-secret-value");
backend
.delete_secret("test-ws", "u/admin/my_secret")
.await
.unwrap();
backend.delete_secret("test-ws", "u/admin/my_secret").await.unwrap();
println!(" ✓ Create + Get + Delete roundtrip passed");
}
@@ -235,11 +235,7 @@ async fn clearing_one_version_leaves_the_others(db: Pool<Postgres>) {
// this is where two versions coexist: it pins the batched edge insert
// against a real database as well as the version scoping.
assert_eq!(edges_for(&db, 1).await, 0, "the cleared version's edges go");
assert_eq!(
edges_for(&db, 2).await,
1,
"the other version keeps its own"
);
assert_eq!(edges_for(&db, 2).await, 1, "the other version keeps its own");
}
/// The routes that hard-delete a path clear no graph rows: they delete the
@@ -367,11 +363,7 @@ async fn only_the_newest_deploys_keep_their_graph(db: Pool<Postgres>) {
// The newest is always among them: losing the live version's graph would
// empty the page of every run of it.
assert_eq!(nodes_for(&db, over, DEPLOYED_GRAPH).await, 1);
assert_eq!(
nodes_for(&db, 1, DEPLOYED_GRAPH).await,
0,
"the oldest is reclaimed"
);
assert_eq!(nodes_for(&db, 1, DEPLOYED_GRAPH).await, 0, "the oldest is reclaimed");
}
/// The third provenance: a `parse` of the EDITOR's buffer, which names no
@@ -488,27 +480,17 @@ async fn a_version_clear_spares_editor_graphs_and_a_path_clear_does_not(db: Pool
replace_dbt_editor_graph(&mut tx, WS, PATH, job, ME, &manifest(&["a"]), "root")
.await
.unwrap();
clear_dbt_manifest_version(&mut tx, WS, PATH, 1)
.await
.unwrap();
clear_dbt_manifest_version(&mut tx, WS, PATH, 1).await.unwrap();
tx.commit().await.unwrap();
assert_eq!(nodes_for(&db, 1, DEPLOYED_GRAPH).await, 0);
assert_eq!(
editor_nodes(&db, job).await,
1,
"the buffer's graph survives"
);
assert_eq!(editor_nodes(&db, job).await, 1, "the buffer's graph survives");
let mut tx = db.begin().await.unwrap();
clear_dbt_editor_graphs(&mut tx, WS, PATH).await.unwrap();
tx.commit().await.unwrap();
assert_eq!(
editor_nodes(&db, job).await,
0,
"retiring the path takes it"
);
assert_eq!(editor_nodes(&db, job).await, 0, "retiring the path takes it");
}
/// A preview names its own PATH and needs only `jobs:run`, so a bound over the