Documentation ¶
Index ¶
- func CheckTiDBVersion(r *require.Assertions, constraint string) bool
- func GetTiDBVersion(t *testing.T, testDB *testutil.TestDB) string
- func LoadFixtures(t *testing.T, testDB *testutil.TestDB, dir string)
- func TestReqWithHandlers(req *http.Request, handlers ...gin.HandlerFunc) (*gin.Context, *httptest.ResponseRecorder)
- type App
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTiDBVersion ¶
func CheckTiDBVersion(r *require.Assertions, constraint string) bool
CheckTiDBVersion tests if tidb version satisfies the constraints. Constraint examples: "~5.2.2", ">= 5.3.0", see github.com/Masterminds/semver to get more information.
func TestReqWithHandlers ¶
func TestReqWithHandlers(req *http.Request, handlers ...gin.HandlerFunc) (*gin.Context, *httptest.ResponseRecorder)
Types ¶
type App ¶
func NewMockApp ¶
func (*App) RequireStart ¶
RequireStart calls Start, failing the test if an error is encountered. It also sleep 5 seconds to wait for the server to start.
func (*App) RequireStop ¶
func (app *App) RequireStop()
RequireStop calls Stop, failing the test if an error is encountered.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.