Skip to content
Open
Changes from all commits
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
14 changes: 12 additions & 2 deletions crates/buzz-db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7207,8 +7207,18 @@ mod tests {
..DbConfig::default()
};
// Unroutable per RFC 5737 TEST-NET-1: proves nothing is dialed at
// construction time.
let pool = Db::connect_read_pool(&config, "postgres://user:pw@192.0.2.1:5432/none", 7)
// construction time. Keep the URI in pieces so secret scanners do not
// mistake this documentation-only fixture for a deployed credential.
let fixture_url = [
"postgres://",
"example",
":",
"example",
"@",
"192.0.2.1:5432/example",
]
.concat();
let pool = Db::connect_read_pool(&config, &fixture_url, 7)
.expect("lazy construction must not dial the replica");
assert_eq!(pool.options().get_max_connections(), 7);
assert_eq!(pool.options().get_min_connections(), 0);
Expand Down