testhelpers

package
v0.0.0-...-da86336 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMockData

func CreateMockData(ctx context.Context, tx repository.Transactable, videos model.Videos) error

func NewTestTransactable

func NewTestTransactable(
	dbClient database.Client,
) repository.Transactable

NewTestTransactable creates a new Transactable instance.

func SetupRepo

func SetupRepo(ctx context.Context) setupTx

func ShouldRollback

func ShouldRollback(ctx context.Context) bool

ShouldRollback checks if the context contains a rollback flag

func WithRollbackFlag

func WithRollbackFlag(ctx context.Context, rollback bool) context.Context

WithRollbackFlag adds the rollback flag to the context

Types

type PostgresContainer

type PostgresContainer struct {
	*postgres.PostgresContainer
}

func SetupPostgresContainer

func SetupPostgresContainer(ctx context.Context) (*PostgresContainer, error)

Jump to

Keyboard shortcuts

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