Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrityPostgresError ¶
PrityPostgresError returns a formatted error message for PostgreSQL errors.
Types ¶
type PostgresTest ¶
PostgresTest is a test helper for postgres.
It creates a postgres instance in a docker container. Can be used with flow_postgres.
func NewPostgresTest ¶
func NewPostgresTest(ctx context.Context) (*PostgresTest, error)
NewPostgresTest creates a PostgresTest instance to test against a postgres server in a docker container.
func (*PostgresTest) AddData ¶
func (tp *PostgresTest) AddData(ctx context.Context, data string) error
AddData adds data in yaml-format to the database.
func (*PostgresTest) Cleanup ¶
func (tp *PostgresTest) Cleanup(t *testing.T)
Cleanup uses t.cleanup to register a cleanup function after the test is done.
This can be used to reuse a PostgresTest without restarting the postgres server.
func (*PostgresTest) Close ¶
func (tp *PostgresTest) Close() error
Close closes the postgres instance by removing the postgres container.
func (*PostgresTest) Flow ¶
func (tp *PostgresTest) Flow() (*datastore.FlowPostgres, error)
Flow returns a flow that is using the postgres instance.
Click to show internal directories.
Click to hide internal directories.