helpers

package
v0.0.0-...-91de801 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmbedMigrations embed.FS

Functions

func CreateTestDatabase

func CreateTestDatabase(name string) *memory.DbProvider

func GetAppSettings

func GetAppSettings(appNum int) settings.AppSettings

GetAppSettings gets the settings for the http servers taking into account a unique port. Very hacky way to get a unique port: manually have to pass a new number for every test... TODO : Find a way to assign a unique port at compile time

func RunDatabaseServer

func RunDatabaseServer(as settings.AppSettings)

func StartAdminApp

func StartAdminApp(
	ctx context.Context, as settings.AppSettings, dbConn *sqlx.DB,
) (*gin.Engine, error)

StartAdminApp configures and starts the administration application which will be tested by returning a `*gin.Engine` but without attaching an http.Server

func StartApp

func StartApp(
	ctx context.Context, as settings.AppSettings, dbConn *sqlx.DB,
) (*gin.Engine, error)

StartApp configures and starts the application to be tested by returning a `*gin.Engine` but without attaching an http.Server to it

func WaitForDb

func WaitForDb(ctx context.Context, as settings.AppSettings) (*sqlx.DB, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL