testsuite

package
v4.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const TimeZone = "Canada/Eastern"

Variables

This section is empty.

Functions

func Accounts

func Accounts(sess db.Session) db.Store

Types

type Account

type Account struct {
	ID        uint64     `db:"id,omitempty"`
	Name      string     `db:"name"`
	Disabled  bool       `db:"disabled"`
	CreatedAt *time.Time `db:"created_at,omitempty"`
}

func (*Account) AfterCreate

func (account *Account) AfterCreate(sess db.Session) error

func (*Account) Store

func (*Account) Store(sess db.Session) db.Store

type AccountsStore

type AccountsStore struct {
	db.Collection
}

type GenericTestSuite

type GenericTestSuite struct {
	suite.Suite

	Helper
}

func (*GenericTestSuite) AfterTest

func (s *GenericTestSuite) AfterTest(suiteName, testName string)

func (*GenericTestSuite) BeforeTest

func (s *GenericTestSuite) BeforeTest(suiteName, testName string)

func (*GenericTestSuite) TestComparisonOperators

func (s *GenericTestSuite) TestComparisonOperators()

func (*GenericTestSuite) TestDatesAndUnicode

func (s *GenericTestSuite) TestDatesAndUnicode()

func (*GenericTestSuite) TestExplicitAndDefaultMapping

func (s *GenericTestSuite) TestExplicitAndDefaultMapping()

func (*GenericTestSuite) TestFibonacci

func (s *GenericTestSuite) TestFibonacci()

func (*GenericTestSuite) TestOddEven

func (s *GenericTestSuite) TestOddEven()

type Helper

type Helper interface {
	Session() db.Session

	Adapter() string

	TearUp() error
	TearDown() error
}

type Log

type Log struct {
	ID      uint64 `db:"id,omitempty"`
	Message string `db:"message"`
}

func (*Log) Store

func (*Log) Store(sess db.Session) db.Store

type LogsStore

type LogsStore struct {
	db.Collection
}

func Logs

func Logs(sess db.Session) *LogsStore

type RecordTestSuite

type RecordTestSuite struct {
	suite.Suite
	Helper
}

func (*RecordTestSuite) AfterTest

func (s *RecordTestSuite) AfterTest(suiteName, testName string)

func (*RecordTestSuite) BeforeTest

func (s *RecordTestSuite) BeforeTest(suiteName, testName string)

func (*RecordTestSuite) TestAccounts

func (s *RecordTestSuite) TestAccounts()

func (*RecordTestSuite) TestContextCanceled added in v4.5.2

func (s *RecordTestSuite) TestContextCanceled()

func (*RecordTestSuite) TestDelete

func (s *RecordTestSuite) TestDelete()

func (*RecordTestSuite) TestFindOne

func (s *RecordTestSuite) TestFindOne()

func (*RecordTestSuite) TestInheritedTx

func (s *RecordTestSuite) TestInheritedTx()

func (*RecordTestSuite) TestSelectOnlyIDs

func (s *RecordTestSuite) TestSelectOnlyIDs()

func (*RecordTestSuite) TestSlices

func (s *RecordTestSuite) TestSlices()

func (*RecordTestSuite) TestTx

func (s *RecordTestSuite) TestTx()

func (*RecordTestSuite) TestUnknownCollection

func (s *RecordTestSuite) TestUnknownCollection()

type SQLTestSuite

type SQLTestSuite struct {
	suite.Suite

	Helper
}

func (*SQLTestSuite) AfterTest

func (s *SQLTestSuite) AfterTest(suiteName, testName string)

func (*SQLTestSuite) BeforeTest

func (s *SQLTestSuite) BeforeTest(suiteName, testName string)

func (*SQLTestSuite) TestBatchInsert

func (s *SQLTestSuite) TestBatchInsert()

func (*SQLTestSuite) TestBatchInsertNoColumns

func (s *SQLTestSuite) TestBatchInsertNoColumns()

func (*SQLTestSuite) TestBatchInsertReturningKeys

func (s *SQLTestSuite) TestBatchInsertReturningKeys()

func (*SQLTestSuite) TestCompositeKeys

func (s *SQLTestSuite) TestCompositeKeys()

func (*SQLTestSuite) TestCustomType

func (s *SQLTestSuite) TestCustomType()

func (*SQLTestSuite) TestDataTypes

func (s *SQLTestSuite) TestDataTypes()

func (*SQLTestSuite) TestExhaustConnectionPool

func (s *SQLTestSuite) TestExhaustConnectionPool()

func (*SQLTestSuite) TestExpectCursorError

func (s *SQLTestSuite) TestExpectCursorError()

func (*SQLTestSuite) TestFunction

func (s *SQLTestSuite) TestFunction()

func (*SQLTestSuite) TestGetAllResults

func (s *SQLTestSuite) TestGetAllResults()

func (*SQLTestSuite) TestGetOneResult

func (s *SQLTestSuite) TestGetOneResult()

func (*SQLTestSuite) TestGetResultsOneByOne

func (s *SQLTestSuite) TestGetResultsOneByOne()

func (*SQLTestSuite) TestGetWithOffset

func (s *SQLTestSuite) TestGetWithOffset()

func (*SQLTestSuite) TestGroup

func (s *SQLTestSuite) TestGroup()

func (*SQLTestSuite) TestInlineStructs

func (s *SQLTestSuite) TestInlineStructs()

func (*SQLTestSuite) TestInsertAndDelete

func (s *SQLTestSuite) TestInsertAndDelete()

func (*SQLTestSuite) TestInsertDefault

func (s *SQLTestSuite) TestInsertDefault()

func (*SQLTestSuite) TestInsertIntoArtistsTable

func (s *SQLTestSuite) TestInsertIntoArtistsTable()

func (*SQLTestSuite) TestInsertReturning

func (s *SQLTestSuite) TestInsertReturning()

func (*SQLTestSuite) TestInsertReturningWithinTransaction

func (s *SQLTestSuite) TestInsertReturningWithinTransaction()

func (*SQLTestSuite) TestNullableFields

func (s *SQLTestSuite) TestNullableFields()

func (*SQLTestSuite) TestPaginator

func (s *SQLTestSuite) TestPaginator()

func (*SQLTestSuite) TestPaginator_Issue607 added in v4.0.2

func (s *SQLTestSuite) TestPaginator_Issue607()

func (*SQLTestSuite) TestPreparedStatementsCache

func (s *SQLTestSuite) TestPreparedStatementsCache()

func (*SQLTestSuite) TestQueryLogger

func (s *SQLTestSuite) TestQueryLogger()

func (*SQLTestSuite) TestQueryNonExistentCollection

func (s *SQLTestSuite) TestQueryNonExistentCollection()

func (*SQLTestSuite) TestSelectFromSubquery added in v4.5.3

func (s *SQLTestSuite) TestSelectFromSubquery()

func (*SQLTestSuite) TestSession

func (s *SQLTestSuite) TestSession()

func (*SQLTestSuite) TestTransactionsAndRollback

func (s *SQLTestSuite) TestTransactionsAndRollback()

Attempts to test database transactions.

func (*SQLTestSuite) TestTruncateAllCollections

func (s *SQLTestSuite) TestTruncateAllCollections()

func (*SQLTestSuite) TestUpdate

func (s *SQLTestSuite) TestUpdate()

func (*SQLTestSuite) TestUpdateWithNullColumn

func (s *SQLTestSuite) TestUpdateWithNullColumn()

func (*SQLTestSuite) Test_Issue565

func (s *SQLTestSuite) Test_Issue565()

type Suite

type Suite struct {
	suite.Suite

	Helper
}

func (*Suite) AfterTest

func (s *Suite) AfterTest(suiteName, testName string)

func (*Suite) BeforeTest

func (s *Suite) BeforeTest(suiteName, testName string)

type User

type User struct {
	ID        uint64 `db:"id,omitempty"`
	AccountID uint64 `db:"account_id"`
	Username  string `db:"username"`
}

func (*User) AfterCreate

func (user *User) AfterCreate(sess db.Session) error

func (*User) Store

func (*User) Store(sess db.Session) db.Store

type UsersStore

type UsersStore struct {
	db.Collection
}

func Users

func Users(sess db.Session) *UsersStore

Jump to

Keyboard shortcuts

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