test(db): keep invite repair communities valid under schema constraints

Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz>
Signed-off-by: Brad Seiler <seiler@squareup.com>
This commit is contained in:
Brad Seiler
2026-11-09 16:31:11 -08:00
committed by GitHub
parent ea76471069
commit 4a3ee15016

View File

@@ -189,13 +189,9 @@ async fn legacy_fixture() -> (PgPool, Vec<LegacyInviteCase>) {
let issuer = [1u8; 32];
let mut cases = Vec::new();
// Exercise cached successor lookups and the smallest valid UUID.
// Twelve valid communities exercise cached successor lookups.
for index in 0u8..12 {
let community = if index == 0 {
Uuid::nil()
} else {
Uuid::new_v4()
};
let community = Uuid::new_v4();
sqlx::query("INSERT INTO communities (id, host) VALUES ($1, $2)")
.bind(community)
.bind(format!("upgrade-{index}-{community}.example"))