Documentation ¶
Index ¶
- func CreateApplication[TServer, TContainer any](t testing.TB, creater AppCreater[TServer, TContainer], configName ...string) (TServer, TContainer)
- func CreateApplicationFunc[TServer, TContainer any](t testing.TB, creater AppCreaterFunc[TServer, TContainer]) (TServer, TContainer)
- func CreateMongoDBWithDBName(t testing.TB, optMaker MongoOptions) (*mongo.Client, string)
- func CreateMySQL(t testing.TB, optMaker MySQLOptions) (*sql.DB, string)
- func CreateScyllaDB(t testing.TB, optMaker ScyllaDBOptions) *gocql.Session
- func FindConfig(t testing.TB, configName ...string) string
- func FindFile(t testing.TB, fileName string) string
- func GetConfig[T any](t testing.TB, create func(*viper.Viper) (T, error)) T
- func NewAppTestLogger(t testing.TB, level zerolog.Level) (zerolog.Logger, *zltest.Tester)
- func ProjectRootDir(t testing.TB) string
- func Timeout(t testing.TB, timeout time.Duration) context.Context
- func WorkingDir(t testing.TB) string
- type AppCreater
- type AppCreaterFunc
- type MongoOptions
- type MySQLOptions
- type MySQLOptionsData
- type ScyllaDBOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateApplication ¶
func CreateApplication[TServer, TContainer any](t testing.TB, creater AppCreater[TServer, TContainer], configName ...string) (TServer, TContainer)
func CreateApplicationFunc ¶
func CreateApplicationFunc[TServer, TContainer any](t testing.TB, creater AppCreaterFunc[TServer, TContainer]) (TServer, TContainer)
func CreateMongoDBWithDBName ¶ added in v0.15.0
func CreateMySQL ¶ added in v0.16.0
func CreateScyllaDB ¶ added in v0.9.1
func CreateScyllaDB(t testing.TB, optMaker ScyllaDBOptions) *gocql.Session
func NewAppTestLogger ¶
func ProjectRootDir ¶ added in v1.0.0
func WorkingDir ¶ added in v0.9.1
Types ¶
type AppCreater ¶
type AppCreaterFunc ¶
type MongoOptions ¶ added in v0.9.1
type MongoOptions interface {
GetOptions() *options.ClientOptions
}
type MySQLOptions ¶ added in v0.16.0
type MySQLOptions interface {
GetOptions() MySQLOptionsData
}
type MySQLOptionsData ¶ added in v0.16.0
type ScyllaDBOptions ¶ added in v0.9.1
type ScyllaDBOptions interface {
GetOptions() *gocql.ClusterConfig
}
Click to show internal directories.
Click to hide internal directories.