Documentation ¶
Index ¶
- func AssertDatabaseCount(t *testing.T, table string, expected int64)
- func AssertDatabaseHas(t *testing.T, table string, conditions map[string]interface{})
- func CountWithQuery(table string, conditions map[string]interface{}) int64
- func CountWithoutQuery(table string) int64
- func DB() *gorm.DB
- func DatabaseTestUtilOpt() fx.Option
- func EnableDatabaseTestUtilOpt() fx.Option
- func EnableRedisTestUtilOpt() fx.Option
- func Insert(model interface{})
- func RedisClient() *redis.Client
- func RedisTestUtilOpt() fx.Option
- func TruncateTables(tables ...string)
- func TruncateTablesHasForeignKey(tables ...string)
- func TruncateTablesHasForeignKeyOpt(tables ...string) fx.Option
- func TruncateTablesOpt(tables ...string) fx.Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertDatabaseCount ¶
AssertDatabaseCount assert database has number of row without query
func AssertDatabaseHas ¶
AssertDatabaseHas assert database has more than a row with query params
func CountWithQuery ¶
func CountWithoutQuery ¶
func DatabaseTestUtilOpt ¶
DatabaseTestUtilOpt Deprecated: use EnableDatabaseTestUtilOpt instead
func EnableRedisTestUtilOpt ¶
func RedisClient ¶
func RedisClient() *redis.Client
func RedisTestUtilOpt ¶
RedisTestUtilOpt Deprecated: use EnableRedisTestUtilOpt instead
func TruncateTables ¶
func TruncateTables(tables ...string)
func TruncateTablesHasForeignKey ¶
func TruncateTablesHasForeignKey(tables ...string)
func TruncateTablesOpt ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.