Documentation
¶
Overview ¶
Package postgres provides opt-in, non-destructive PostgreSQL acceptance helpers. Callers supply only their isolated test database. No helper resets or drops data.
Index ¶
Constants ¶
const ( URLVariable = "FOUNDRY_TEST_POSTGRES_URL" RequiredVariable = "FOUNDRY_TEST_POSTGRES_REQUIRED" )
Variables ¶
This section is empty.
Functions ¶
func Config ¶
Config reads the explicitly opted-in URL. Ordinary test runs skip without it; the required acceptance command fails if it is missing. Errors omit credentials.
Types ¶
type Scope ¶
type Scope struct {
// contains filtered or unexported fields
}
Scope is one retained namespace in the explicitly opted-in test database. Configuration is immutable; each opened pool is independent and bounded.
func Isolate ¶
Isolate allocates only a fresh schema. No database/server is created, and no teardown deletes data. The administration pool closes before this returns.
func (*Scope) Config ¶
Config returns a caller-owned typed configuration for this retained scope. Scope creation uses the explicit URL, so no mutable TLS pointer is shared.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package application binds retained PostgreSQL scopes to production application settings.
|
Package application binds retained PostgreSQL scopes to production application settings. |