Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(node): fix migration v10 test to actually start from v9 schema; c…
…omplete owner_did API assertion
  • Loading branch information
Gravirei committed Jul 15, 2026
commit 42ea041bd533542ca8c49ab71391495820f61449
7 changes: 6 additions & 1 deletion crates/gitlawb-node/src/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3428,8 +3428,13 @@ mod migration_tests {
async fn migration_v11_creates_owner_did_column(pool: sqlx::PgPool) {
let db = super::Db::for_testing(pool);

// Create all tables by running the full migration chain from scratch.
// Create all tables by running the full migration chain from scratch,
// then drop the owner_did column to simulate a pre-v10 schema.
db.migrate().await.unwrap();
sqlx::query("ALTER TABLE received_ref_updates DROP COLUMN owner_did")
.execute(&db.pool)
.await
.unwrap();

// Truncate schema_migrations and re-seed at v9 — simulate an existing
// node that has run v1..v9 but not yet v10.
Expand Down
1 change: 1 addition & 0 deletions crates/gitlawb-node/src/test_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3428,6 +3428,7 @@ mod tests {
events[0]["repo"],
format!("{}/myrepo", owner.split(':').next_back().unwrap())
);
assert_eq!(events[0]["owner_did"], owner);
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

#[sqlx::test]
Expand Down