testsupport

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiscordClientID string = "discord_test_client_id"

	TestUserAPIBaseURL string = "http://test-internal-user-api/api/v1"
)

Variables

View Source
var (
	ServerPort         int
	BaseURL            string
	DatabaseDSN        string
	SetupStoreLocation string

	HS256Key []byte
)

Functions

func AssertGoldenFile

func AssertGoldenFile(t *testing.T, testCaseName string, output []byte, removeUUIDs bool) error

func Bootstrap

func Bootstrap(ctx context.Context) error

func GenerateUserToken

func GenerateUserToken(user *entities.User, expiresAt time.Time) (string, error)

func GoldenFileName

func GoldenFileName(t *testing.T, testCaseName string) string

func RegisterAveragePitTimeLoss

func RegisterAveragePitTimeLoss(pitParamsMock *mocks.MockPitParameters, times int)

func RegisterGetAllServiceDurations

func RegisterGetAllServiceDurations(pitParamsMock *mocks.MockPitParameters, times int)

func RegisterGetPitTimeLoss

func RegisterGetPitTimeLoss(
	pitParamsMock *mocks.MockPitParameters,
	rc entities.RaceClass,
	trackID uuid.UUID,
	layoutID *uuid.UUID,
	times int,
)

func RegisterGetServiceDurations

func RegisterGetServiceDurations(pitParamsMock *mocks.MockPitParameters, rc entities.RaceClass, times int)

func RemoveUUIDs

func RemoveUUIDs(data string) string

func Teardown

func Teardown() error

Types

type ExpectedValidationError

type ExpectedValidationError struct {
	Field string
	Msg   string
	Value interface{}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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