bundbtest

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(t TestingT, dsn string) *bun.DB

NewDB creates a new *bun.DB. Don't forget to set up goose before using this function.

func NewPostgres

func NewPostgres(pool *dockertest.Pool, expSeconds uint) (*dockertest.Resource, *url.URL, error)

Types

type Fixture

type Fixture struct {
	*dbfixture.Fixture
}

func NewFixture

func NewFixture(bunDB *bun.DB) *Fixture

func (*Fixture) Ennoblement

func (f *Fixture) Ennoblement(t TestingT, id string) domain.Ennoblement

func (*Fixture) Ennoblements

func (f *Fixture) Ennoblements(t TestingT, ids ...string) []domain.Ennoblement

func (*Fixture) Player

func (f *Fixture) Player(t TestingT, id string) domain.Player

func (*Fixture) PlayerSnapshot

func (f *Fixture) PlayerSnapshot(t TestingT, id string) domain.PlayerSnapshot

func (*Fixture) PlayerSnapshots

func (f *Fixture) PlayerSnapshots(t TestingT, ids ...string) []domain.PlayerSnapshot

func (*Fixture) Players

func (f *Fixture) Players(t TestingT, ids ...string) []domain.Player

func (*Fixture) Server

func (f *Fixture) Server(t TestingT, id string) domain.Server

func (*Fixture) Tribe

func (f *Fixture) Tribe(t TestingT, id string) domain.Tribe

func (*Fixture) TribeChange

func (f *Fixture) TribeChange(t TestingT, id string) domain.TribeChange

func (*Fixture) TribeChanges

func (f *Fixture) TribeChanges(t TestingT, ids ...string) []domain.TribeChange

func (*Fixture) TribeSnapshot

func (f *Fixture) TribeSnapshot(t TestingT, id string) domain.TribeSnapshot

func (*Fixture) TribeSnapshots

func (f *Fixture) TribeSnapshots(t TestingT, ids ...string) []domain.TribeSnapshot

func (*Fixture) Tribes

func (f *Fixture) Tribes(t TestingT, ids ...string) []domain.Tribe

func (*Fixture) Village

func (f *Fixture) Village(t TestingT, id string) domain.Village

func (*Fixture) Villages

func (f *Fixture) Villages(t TestingT, ids ...string) []domain.Village

type TestingT

type TestingT interface {
	Helper()
	Errorf(string, ...interface{})
	FailNow()
	Cleanup(func())
}

TestingT is a subset of the API provided by all *testing.T and *testing.B objects.

Jump to

Keyboard shortcuts

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