test

package module
v0.0.0-...-81b8297 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2019 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

test

基于testify库,将涉及数据库操作的单元测试中加载测试数据文件,数据库初始化等操作封装起来

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Suite

type Suite struct {
	suite.Suite

	Dns             string
	Db              *gorm.DB
	GormSingleModel bool
	Models          []interface{} // 初始化GORM模型 *指针*
	Cleaner         dbcleaner.DbCleaner
	SeedFileName    string
	Polluter        *polluter.Polluter
	Verbose         bool // 是否输出SQL语句
	// contains filtered or unexported fields
}

func (*Suite) Init

func (s *Suite) Init(dns string, models []interface{}, seedFileName string, verbose bool)

init suite info

func (*Suite) SetupSuite

func (s *Suite) SetupSuite()

func (*Suite) SetupTest

func (s *Suite) SetupTest()

func (*Suite) TearDownSuite

func (s *Suite) TearDownSuite()

func (*Suite) TearDownTest

func (s *Suite) TearDownTest()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址