storagetest

package
v0.0.0-...-fd00b2c Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtxT

func CtxT(ctx context.Context) testing.TB

func LimitString

func LimitString(size int) func(string) bool

func OneOff

func OneOff[T any](gen gopter.Gen) T

OneOff generates a single value from the gopter.Gen given

func Positive

func Positive(id radio.UserID) bool

func PutT

func PutT(ctx context.Context, t testing.TB) context.Context

func RunTests

func RunTests(t *testing.T, s TestSetup)

Types

type Suite

type Suite struct {
	ToBeTested TestSetup
	// contains filtered or unexported fields
}

func NewSuite

func NewSuite(ctx context.Context, ts TestSetup) *Suite

func (*Suite) BeforeTest

func (suite *Suite) BeforeTest(testName string) error

func (*Suite) Storage

func (suite *Suite) Storage(t *testing.T) radio.StorageService

func (*Suite) TestGenSessionStorage

func (suite *Suite) TestGenSessionStorage(t *testing.T)

TestGenSessionStorage runs through all methods of the SessionStorage interface with a randomly generated session.

func (*Suite) TestNewsSimpleCreateAndGet

func (suite *Suite) TestNewsSimpleCreateAndGet(t *testing.T)

func (*Suite) TestNewsStorageDeleteExist

func (suite *Suite) TestNewsStorageDeleteExist(t *testing.T)

func (*Suite) TestNewsStorageDeleteNoExist

func (suite *Suite) TestNewsStorageDeleteNoExist(t *testing.T)

func (*Suite) TestNewsWithUser

func (suite *Suite) TestNewsWithUser(t *testing.T)

func (*Suite) TestScheduleUpdate

func (suite *Suite) TestScheduleUpdate(t *testing.T)

func (*Suite) TestSongCreateAndRetrieve

func (suite *Suite) TestSongCreateAndRetrieve(t *testing.T)

func (*Suite) TestSongLastPlayed

func (suite *Suite) TestSongLastPlayed(t *testing.T)

func (*Suite) TestStatusStore

func (suite *Suite) TestStatusStore(t *testing.T)

func (*Suite) TestTrackUpdateMetadata

func (suite *Suite) TestTrackUpdateMetadata(t *testing.T)

func (*Suite) TestTransactionCommit

func (suite *Suite) TestTransactionCommit(t *testing.T)

func (*Suite) TestTransactionRollback

func (suite *Suite) TestTransactionRollback(t *testing.T)

type TestSetup

type TestSetup interface {
	Setup(context.Context) error
	CreateStorage(ctx context.Context, name string) (radio.StorageService, error)
	TearDown(context.Context) error
}

Jump to

Keyboard shortcuts

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