mirror of
https://github.com/block/buzz.git
synced 2026-11-16 06:11:34 +00:00
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:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user