Skip to content

Commit aa200bb

Browse files
committed
test(admin): resolve archived worker executable
Signed-off-by: Ravneet Arora <[email protected]>
1 parent 0c18585 commit aa200bb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎crates/buzz-admin/tests/postgres_storage_snapshot.rs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ async fn run_worker(database_url: &str, proxy: &Server, s3: &Server) -> WorkerOu
171171
// The proxy deliberately interrupts the PostgreSQL handshake. Keep TLS
172172
// out of this local transport test so it exercises sqlx::Error::Io.
173173
url.query_pairs_mut().append_pair("sslmode", "disable");
174-
let mut child = Command::new(env!("CARGO_BIN_EXE_buzz-admin"))
174+
// nextest relocates executables when extracting a test archive. Keep the
175+
// compile-time Cargo path only as the fallback for local cargo test runs.
176+
let worker_binary = std::env::var_os("NEXTEST_BIN_EXE_buzz_admin")
177+
.unwrap_or_else(|| env!("CARGO_BIN_EXE_buzz-admin").into());
178+
let mut child = Command::new(worker_binary)
175179
.args(["storage-snapshot", "--max-objects", "100"])
176180
.env_clear()
177181
.env("DATABASE_URL", url.as_str())

0 commit comments

Comments
 (0)