Documentation ¶
Index ¶
- func AuthInjectorTestHandler(userID string) fiber.Handler
- func BuildRequest(method, url, body string) *http.Request
- func Logger() *zerolog.Logger
- func SetupAppFiber(logger zerolog.Logger) *fiber.App
- func StartContainerDatabase(ctx context.Context, dbName string, t *testing.T, migrationsDirRelPath string) (db.Store, testcontainers.Container)
- func TruncateTables(db *sql.DB, t *testing.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthInjectorTestHandler ¶
func AuthInjectorTestHandler(userID string) fiber.Handler
AuthInjectorTestHandler injects fake jwt with sub
func BuildRequest ¶
func SetupAppFiber ¶
SetupAppFiber sets up app fiber with defaults for testing, like our production error handler.
func StartContainerDatabase ¶
func StartContainerDatabase(ctx context.Context, dbName string, t *testing.T, migrationsDirRelPath string) (db.Store, testcontainers.Container)
StartContainerDatabase starts postgres container with default test settings, and migrates the db. Caller must terminate container.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.