Documentation
¶
Overview ¶
Package testdb provides guarded, schema-isolated PostgreSQL databases for integration tests and benchmarks. It is internal so applications cannot accidentally depend on test provisioning behavior.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Schema ¶
type Schema struct {
Driver store.Driver
DatabaseName string
Name string
// contains filtered or unexported fields
}
func OpenPostgreSQLSchema ¶
func OpenPostgreSQLSchema(ctx context.Context, rawURL, requiredDatabaseSuffix, prefix string) (*Schema, error)
OpenPostgreSQLSchema creates a random schema after verifying that the target database name has the required test/benchmark suffix. This prevents an accidental environment variable from targeting a production database.
Click to show internal directories.
Click to hide internal directories.