From 8dad74faeff3d621b6f940aaf2b58a9a4b0dacaa Mon Sep 17 00:00:00 2001 From: Luke Tornquist Date: Mon, 26 Oct 2026 13:39:25 -0400 Subject: [PATCH] test(db): run invite upgrade pgschema from the repository root The invitation upgrade test launched bin/pgschema from the package directory, so pgschema missed the root .pgschemaignore and exercised a different apply path than every other caller. Set the working directory to the repository root, matching the runtime/migration.rs helper. Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 Signed-off-by: Luke Tornquist --- .../src/store/relay_invite/upgrade_postgres_tests.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/buzz-db/src/store/relay_invite/upgrade_postgres_tests.rs b/crates/buzz-db/src/store/relay_invite/upgrade_postgres_tests.rs index cf8879fb2c..45a11696ac 100644 --- a/crates/buzz-db/src/store/relay_invite/upgrade_postgres_tests.rs +++ b/crates/buzz-db/src/store/relay_invite/upgrade_postgres_tests.rs @@ -458,10 +458,12 @@ async fn apply_pgschema_to_existing_database(pool: &PgPool) { .fetch_one(pool) .await .unwrap(); - let pgschema = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../../bin/pgschema"); - let schema_file = - std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../../schema/schema.sql"); - let output = std::process::Command::new(pgschema) + // Run from the repository root, like every pgschema caller, so + // `.pgschemaignore` applies. + let repo_root = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."); + let schema_file = repo_root.join("schema/schema.sql"); + let output = std::process::Command::new(repo_root.join("bin/pgschema")) + .current_dir(&repo_root) .args([ "apply", "--auto-approve",