testsuite

package
v0.0.0-...-4c964c4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidLoopMsgF = "\"invalid loop id: %d\""
)

Variables

This section is empty.

Functions

func AddRepo

func AddRepo(
	ctx context.Context,
	t *testing.T,
	repoStore store.RepoStore,
	id int64,
	spaceID int64,
	size int64,
)

func AddSpace

func AddSpace(
	ctx context.Context,
	t *testing.T,
	spaceStore store.SpaceStore,
	spacePathStore store.SpacePathStore,
	userID int64,
	spaceID int64,
	parentID int64,
)

func AddUser

func AddUser(
	ctx context.Context,
	t *testing.T,
	principalStore store.PrincipalStore,
	id int64, admin bool,
)

func EqualFieldValue

func EqualFieldValue(t *testing.T, expectedValue interface{}, obj interface{}, fieldName string, msgAndArgs ...interface{})

func EqualStructFieldValue

func EqualStructFieldValue(t *testing.T, expect interface{}, actual interface{}, fieldName string, msgAndArgs ...interface{})

func NotEqualStructFieldValue

func NotEqualStructFieldValue(t *testing.T, expect interface{}, actual interface{}, fieldName string, msgAndArgs ...interface{})

Types

type BaseSuite

type BaseSuite struct {
	suite.Suite

	Constructor Constructor
	Teardown    Teardown

	Ctx  context.Context
	Name string

	Store *TestStore
	Sdb   *sqlx.DB
	Gdb   *gorm.DB
}

func (*BaseSuite) SetupSuite

func (suite *BaseSuite) SetupSuite()

SetupSuite implements suite.SetupAllSuite interface.

func (*BaseSuite) TearDownSuite

func (suite *BaseSuite) TearDownSuite()

TearDownSuite implements suite.TearDownAllSuite.

type Constructor

type Constructor func(ts *TestStore)

type Teardown

type Teardown func() error

type TestStore

type TestStore struct {
	Principal      store.PrincipalStore
	PrincipalCache store.PrincipalInfoCache
	Space          store.SpaceStore
	SpacePath      store.SpacePathStore
	Repo           store.RepoStore
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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