Documentation
¶
Overview ¶
Package dbtest contains supporting code for running tests that hit the DB.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FloatPointer ¶
FloatPointer is a helper to get a *float64 from a float64. It is in the tests package because we normally don't want to deal with pointers to basic types but it's useful in some tests.
func IntPointer ¶
IntPointer is a helper to get a *int from a int. It is in the tests package because we normally don't want to deal with pointers to basic types but it's useful in some tests.
func StringPointer ¶
StringPointer is a helper to get a *string from a string. It is in the tests package because we normally don't want to deal with pointers to basic types but it's useful in some tests.
Types ¶
type CoreAPIs ¶
type CoreAPIs struct {
Delegate *delegate.Delegate
User *user.Core
Product *product.Core
Home *home.Core
VProduct *vproduct.Core
}
CoreAPIs represents all the core api's needed for testing.
type Test ¶
type Test struct {
DB *sqlx.DB
Log *logger.Logger
CoreAPIs CoreAPIs
Teardown func()
V1 struct {
Auth *auth.Auth
}
// contains filtered or unexported fields
}
Test owns state for running and shutting down tests.