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 NewTestingWriter(t *testing.T) *testingWriter
- func ParseEnv(envvar string) (string, string, error)
- func ParseEnvs(r io.Reader) (map[string]string, error)
- func TestCreate(t *testing.T, lastVersion uint, ddls DDLS, fixtures ImportFixtures, ...)
- func TestImportExport(t *testing.T, lastVersion uint, ddls DDLS, fixtures ImportFixtures, ...)
- func TestMigrate(t *testing.T, lastVersion uint, ddls DDLS, fixtures ImportFixtures, ...)
- func Wait(timeout time.Duration, f CheckFunc) error
- type CheckFunc
- type DBContext
- type DDL
- type DDLS
- type GiteaConfig
- type ImportFixtures
- type Process
- type SetupDBFn
- 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 NewTestingWriter ¶ added in v0.7.0
func TestCreate ¶ added in v0.8.0
func TestImportExport ¶ added in v0.8.0
func TestMigrate ¶ added in v0.8.0
Types ¶
type DBContext ¶ added in v0.8.0
type DBContext struct { D manager.DB DBM *manager.DBManager LF lock.LockFactory DBConnString string }
func (*DBContext) AtlasConnString ¶ added in v0.8.0
type GiteaConfig ¶
type ImportFixtures ¶ added in v0.8.0
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.