Documentation ¶
Index ¶
- func CheckCanBeContextError(t *testing.T, ctx *gin.Context, target any)
- func CheckIsContextError(t *testing.T, ctx *gin.Context, target error)
- func CheckNoContextErrors(t *testing.T, ctx *gin.Context)
- func Setup(migrationsDir string) (*gorm.DB, string, error)
- func Teardown(db *gorm.DB, dbname string) error
- type UniqueRand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCanBeContextError ¶
CheckCanBeContextError verifies that the error attached to the context can be matched to the target error. It stops and fails the test otherwise.
func CheckIsContextError ¶
CheckIsContextErrors verifies that the error attached to the context has the specified value. It stops and fails the test otherwise.
func CheckNoContextErrors ¶
CheckNoContextErrors verifies that there are no errors are attached to the context. If stops and fails the test otherwise.
Types ¶
type UniqueRand ¶
type UniqueRand struct {
// contains filtered or unexported fields
}
Overwrite rand.Int() to always return unique numbers
func NewUniqueRand ¶
func NewUniqueRand() UniqueRand
func (UniqueRand) Int ¶
func (r UniqueRand) Int() int
func (UniqueRand) Intn ¶
func (r UniqueRand) Intn(n int) int
Click to show internal directories.
Click to hide internal directories.