Documentation ¶
Index ¶
- Constants
- func CreateDB(t *testing.T, log zerolog.Logger, ctx context.Context, dir string) (*sql.DB, lock.LockFactory, string)
- func CreateDBWithType(t *testing.T, log zerolog.Logger, ctx context.Context, dir string, ...) (*sql.DB, lock.LockFactory, string)
- func DBType(t *testing.T) sql.Type
- func GetFreePort(host string, tcp bool, udp bool) (string, error)
- func NewLogger(t *testing.T) zerolog.Logger
- func NilError(t assert.TestingT, err error, msgAndArgs ...interface{})
- func ParseEnv(envvar string) (string, string, error)
- func ParseEnvs(r io.Reader) (map[string]string, error)
- func TestCreate(t *testing.T, lastVersion uint, dataFixtures DataFixtures, setupDBFn SetupDBFn)
- func TestImportExport(t *testing.T, importFixtureFile string, setupDBFn SetupDBFn, ...)
- func TestMigrate(t *testing.T, lastVersion uint, dataFixtures DataFixtures, setupDBFn SetupDBFn)
- func Wait(timeout time.Duration, f CheckFunc) error
- type CheckFunc
- type ColInfo
- type ColType
- type CreateData
- type DBContext
- func (c *DBContext) AtlasConnString() string
- func (c *DBContext) Column(tableName, colName string) (ColInfo, bool)
- func (c *DBContext) ColumnType(tableName, colName string) (ColType, error)
- func (c *DBContext) Export(ctx context.Context, tables []string, w io.Writer) error
- func (c *DBContext) Import(ctx context.Context, r io.Reader, createData *CreateData) error
- func (c *DBContext) Table(tableName string) (TableInfo, bool)
- func (c *DBContext) Tables() []string
- type DDL
- type DataFixtures
- type GiteaConfig
- type Process
- type Sequence
- type SetupDBFn
- type TableInfo
- type TestGitea
Constants ¶
View Source
const ( MinPort = 2048 MaxPort = 16384 )
Variables ¶
This section is empty.
Functions ¶
func CreateDBWithType ¶ added in v0.8.0
func GetFreePort ¶
Hack to find a free tcp and udp port
func TestCreate ¶ added in v0.8.0
func TestCreate(t *testing.T, lastVersion uint, dataFixtures DataFixtures, setupDBFn SetupDBFn)
func TestImportExport ¶ added in v0.8.0
func TestMigrate ¶ added in v0.8.0
func TestMigrate(t *testing.T, lastVersion uint, dataFixtures DataFixtures, setupDBFn SetupDBFn)
Types ¶
type CreateData ¶ added in v0.9.0
type DBContext ¶ added in v0.8.0
type DBContext struct { D manager.DB DBM *manager.DBManager LF lock.LockFactory DBConnString string Schema []TableInfo }
func (*DBContext) AtlasConnString ¶ added in v0.8.0
func (*DBContext) ColumnType ¶ added in v0.9.0
type DataFixtures ¶ added in v0.9.0
type GiteaConfig ¶
type Process ¶
type Process struct { Cmd *gexpect.ExpectSubprocess // contains filtered or unexported fields }
func (*Process) StartExpect ¶
Click to show internal directories.
Click to hide internal directories.