test

package
v0.9.1-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: AGPL-3.0, AGPL-3.0-only Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FxE2E

func FxE2E(t *testing.T) fx.Option

func GetGorm

func GetGorm(t *testing.T) *gorm.DB

func GetWebApp

func GetWebApp(t *testing.T, m Mock) *fiber.App

func MockAuthRepo

func MockAuthRepo(m domain.AuthRepo) fx.Option

func MockCache

func MockCache(mock cache.Generic) fx.Option

func MockCharacterRepo

func MockCharacterRepo(m domain.CharacterRepo) fx.Option

func MockEmptyCache

func MockEmptyCache() fx.Option

func MockEpisodeRepo

func MockEpisodeRepo(m domain.EpisodeRepo) fx.Option

func MockIndexRepo

func MockIndexRepo(repo domain.IndexRepo) fx.Option

func MockPersonRepo

func MockPersonRepo(m domain.PersonRepo) fx.Option

func MockSubjectRepo

func MockSubjectRepo(m domain.SubjectRepo) fx.Option

func MockUserRepo

func MockUserRepo(repo domain.UserRepo) fx.Option

func RequireEnv

func RequireEnv(t *testing.T, envs ...string)

RequireEnv

func TestGet(t *testing.T) {
  RequireEnv(t, "mysql", "redis")
  ...
}

Types

type Mock

type Mock struct {
	SubjectRepo   domain.SubjectRepo
	PersonRepo    domain.PersonRepo
	CharacterRepo domain.CharacterRepo
	AuthRepo      domain.AuthRepo
	EpisodeRepo   domain.EpisodeRepo
	UserRepo      domain.UserRepo
	IndexRepo     domain.IndexRepo
	Cache         cache.Generic
}

Jump to

Keyboard shortcuts

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