package
0.4.2
Repository: https://github.com/theopenlane/utils.git
Documentation: pkg.go.dev

# Functions

AssertBodyString asserts that a Request Body matches the expected string.
AssertFailureNotCalled is a failure http.Handler that fails if called.
AssertSuccessNotCalled is a success http.Handler that fails if called.
No description provided by the author
GetTestURI returns the dialect, connection string and if used a testcontainer for database connectivity in tests.
NewErrorServer returns a new httptest.Server, which responds with the given error message and code and a client which proxies requests to the server.
NewTestServerFunc is an adapter to allow the use of ordinary functions.
No description provided by the author
TestServer returns a httptest.Server + servermux for handlers + client which proxies to the server.
WithExpiryMinutes sets the expiration of the container, defaults to 10 minutes.
WithImage sets the image used for docker tests.
WithMaxConn sets the max connections to the db container, defaults to 100.

# Variables

ErrInvalidDBURI is returned when an invalid DB URI is used.

# Structs

DBConfig is a struct that holds the configuration for the database.
RewriteTransport rewrites https requests to http to avoid TLS tomfoolery.
TestFixture is a struct that holds the pool, resource and URI for the database.

# Type aliases

Option is a functional option for configuring the DBConfig.