Skip to content

Commit 689c76b

Browse files
committed
Limit precondition
1 parent 568e35c commit 689c76b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/AppTests/Helpers/DatabasePool.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ extension DatabasePool.Database {
172172
self.host = "db-\(port)"
173173
} else {
174174
self.host = Environment.get("DATABASE_HOST")!
175+
precondition(["localhost", "postgres", "host.docker.internal"].contains(host),
176+
"DATABASE_HOST must be a local db, was: \(host)")
175177
}
176-
precondition(["localhost", "postgres", "host.docker.internal"].contains(host),
177-
"DATABASE_HOST must be a local db, was: \(host)")
178178
self.port = port
179179
self.username = Environment.get("DATABASE_USERNAME")!
180180
self.password = Environment.get("DATABASE_PASSWORD")!

0 commit comments

Comments
 (0)