testserverclient

package
v0.0.0-...-6e93ed8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Regression = true
)

Functions

func MustExec

func MustExec(ctx context.Context, t *testing.T, conn *sql.Conn, sql string)

func MustQuery

func MustQuery(ctx context.Context, t *testing.T, cli *TestServerClient, conn *sql.Conn, sql string)

Types

type TestServerClient

type TestServerClient struct {
	StatusScheme string
	Port         uint
	StatusPort   uint
}

TestServerClient config server connect parameters and provider several method to communicate with server and run tests

func NewTestServerClient

func NewTestServerClient() *TestServerClient

NewTestServerClient return a TestServerClient with unique address

func (*TestServerClient) Addr

func (cli *TestServerClient) Addr() string

Addr returns the address of the server.

func (*TestServerClient) CheckRows

func (cli *TestServerClient) CheckRows(t *testing.T, rows *sql.Rows, expectedRows ...string)

func (*TestServerClient) FetchStatus

func (cli *TestServerClient) FetchStatus(path string) (*http.Response, error)

FetchStatus exec http.Get to server status port

func (*TestServerClient) FormStatus

func (cli *TestServerClient) FormStatus(path string, data url.Values) (*http.Response, error)

FormStatus post a form request to server status address

func (*TestServerClient) GetDSN

func (cli *TestServerClient) GetDSN(overriders ...configOverrider) string

GetDSN generates a DSN string for MySQL connection.

func (*TestServerClient) GetDSNWithCursor

func (cli *TestServerClient) GetDSNWithCursor(fetchSize uint32) string

GetDSN generates a DSN string for MySQL connection.

func (*TestServerClient) PostStatus

func (cli *TestServerClient) PostStatus(path, contentType string, body io.Reader) (*http.Response, error)

PostStatus exec http.Port to server status port

func (*TestServerClient) Rows

func (*TestServerClient) Rows(t *testing.T, rows *sql.Rows) []string

func (*TestServerClient) RunFailedTestMultiStatements

func (cli *TestServerClient) RunFailedTestMultiStatements(t *testing.T)

func (*TestServerClient) RunReloadTLS

func (cli *TestServerClient) RunReloadTLS(t *testing.T, overrider configOverrider, errorNoRollback bool) error

func (*TestServerClient) RunTestAccountLock

func (cli *TestServerClient) RunTestAccountLock(t *testing.T)

func (*TestServerClient) RunTestAuth

func (cli *TestServerClient) RunTestAuth(t *testing.T)

func (*TestServerClient) RunTestClientWithCollation

func (cli *TestServerClient) RunTestClientWithCollation(t *testing.T)

func (*TestServerClient) RunTestConnectionCount

func (cli *TestServerClient) RunTestConnectionCount(t *testing.T)

func (*TestServerClient) RunTestDBNameEscape

func (cli *TestServerClient) RunTestDBNameEscape(t *testing.T)

func (*TestServerClient) RunTestDBStmtCount

func (cli *TestServerClient) RunTestDBStmtCount(t *testing.T)

func (*TestServerClient) RunTestEnableSecureTransport

func (cli *TestServerClient) RunTestEnableSecureTransport(t *testing.T, overrider configOverrider) error

func (*TestServerClient) RunTestErrorCode

func (cli *TestServerClient) RunTestErrorCode(t *testing.T)

func (*TestServerClient) RunTestExplainForConn

func (cli *TestServerClient) RunTestExplainForConn(t *testing.T)

func (*TestServerClient) RunTestInfoschemaClientErrors

func (cli *TestServerClient) RunTestInfoschemaClientErrors(t *testing.T)

Client errors are only incremented when using the TiDB Server protocol, and not internal SQL statements. Thus, this test is in the server-test suite.

func (*TestServerClient) RunTestInitConnect

func (cli *TestServerClient) RunTestInitConnect(t *testing.T)

func (*TestServerClient) RunTestIssue22646

func (cli *TestServerClient) RunTestIssue22646(t *testing.T)

func (*TestServerClient) RunTestIssue3662

func (cli *TestServerClient) RunTestIssue3662(t *testing.T)

func (*TestServerClient) RunTestIssue3680

func (cli *TestServerClient) RunTestIssue3680(t *testing.T)

func (*TestServerClient) RunTestIssue3682

func (cli *TestServerClient) RunTestIssue3682(t *testing.T)

func (*TestServerClient) RunTestIssue53634

func (cli *TestServerClient) RunTestIssue53634(t *testing.T)

func (*TestServerClient) RunTestIssue54254

func (cli *TestServerClient) RunTestIssue54254(t *testing.T)

func (*TestServerClient) RunTestLoadData

func (cli *TestServerClient) RunTestLoadData(t *testing.T, server *server.Server)

func (*TestServerClient) RunTestLoadDataAutoRandom

func (cli *TestServerClient) RunTestLoadDataAutoRandom(t *testing.T)

func (*TestServerClient) RunTestLoadDataAutoRandomWithSpecialTerm

func (cli *TestServerClient) RunTestLoadDataAutoRandomWithSpecialTerm(t *testing.T)

func (*TestServerClient) RunTestLoadDataForListColumnPartition

func (cli *TestServerClient) RunTestLoadDataForListColumnPartition(t *testing.T)

func (*TestServerClient) RunTestLoadDataForListColumnPartition2

func (cli *TestServerClient) RunTestLoadDataForListColumnPartition2(t *testing.T)

func (*TestServerClient) RunTestLoadDataForListPartition

func (cli *TestServerClient) RunTestLoadDataForListPartition(t *testing.T)

func (*TestServerClient) RunTestLoadDataForListPartition2

func (cli *TestServerClient) RunTestLoadDataForListPartition2(t *testing.T)

func (*TestServerClient) RunTestLoadDataForSlowLog

func (cli *TestServerClient) RunTestLoadDataForSlowLog(t *testing.T)

func (*TestServerClient) RunTestLoadDataInTransaction

func (cli *TestServerClient) RunTestLoadDataInTransaction(t *testing.T)

func (*TestServerClient) RunTestLoadDataWithColumnList

func (cli *TestServerClient) RunTestLoadDataWithColumnList(t *testing.T, _ *server.Server)

func (*TestServerClient) RunTestLoadDataWithSelectIntoOutfile

func (cli *TestServerClient) RunTestLoadDataWithSelectIntoOutfile(t *testing.T)

func (*TestServerClient) RunTestMultiStatements

func (cli *TestServerClient) RunTestMultiStatements(t *testing.T)

func (*TestServerClient) RunTestPrepareResultFieldType

func (cli *TestServerClient) RunTestPrepareResultFieldType(t *testing.T)

func (*TestServerClient) RunTestPreparedString

func (cli *TestServerClient) RunTestPreparedString(t *testing.T)

func (*TestServerClient) RunTestPreparedTimestamp

func (cli *TestServerClient) RunTestPreparedTimestamp(t *testing.T)

runTestPreparedTimestamp does not really cover binary timestamp format, because MySQL driver in golang does not use this format. MySQL driver in golang will convert the timestamp to a string. This case guarantees it could work.

func (*TestServerClient) RunTestRegression

func (cli *TestServerClient) RunTestRegression(t *testing.T, overrider configOverrider, dbName string)

func (*TestServerClient) RunTestResultFieldTableIsNull

func (cli *TestServerClient) RunTestResultFieldTableIsNull(t *testing.T)

func (*TestServerClient) RunTestSQLModeIsLoadedBeforeQuery

func (cli *TestServerClient) RunTestSQLModeIsLoadedBeforeQuery(t *testing.T)

func (*TestServerClient) RunTestSpecialType

func (cli *TestServerClient) RunTestSpecialType(t *testing.T)

func (*TestServerClient) RunTestStatusAPI

func (cli *TestServerClient) RunTestStatusAPI(t *testing.T)

func (*TestServerClient) RunTestStmtCount

func (cli *TestServerClient) RunTestStmtCount(t *testing.T)

func (*TestServerClient) RunTestSumAvg

func (cli *TestServerClient) RunTestSumAvg(t *testing.T)

func (*TestServerClient) RunTestTLSConnection

func (cli *TestServerClient) RunTestTLSConnection(t *testing.T, overrider configOverrider) error

func (*TestServerClient) RunTestTypeAndCharsetOfSendLongData

func (cli *TestServerClient) RunTestTypeAndCharsetOfSendLongData(t *testing.T)

func (*TestServerClient) RunTests

func (cli *TestServerClient) RunTests(t *testing.T, overrider configOverrider, tests ...func(dbt *testkit.DBTestKit))

RunTests runs tests using the default database `test`.

func (*TestServerClient) RunTestsOnNewDB

func (cli *TestServerClient) RunTestsOnNewDB(t *testing.T, overrider configOverrider, dbName string, tests ...func(dbt *testkit.DBTestKit))

RunTestsOnNewDB runs tests using a specified database which will be created before the test and destroyed after the test.

func (*TestServerClient) StatusURL

func (cli *TestServerClient) StatusURL(path string) string

StatusURL returns the full URL of a status path

func (*TestServerClient) WaitUntilCustomServerCanConnect

func (cli *TestServerClient) WaitUntilCustomServerCanConnect(overriders ...configOverrider)

func (*TestServerClient) WaitUntilServerCanConnect

func (cli *TestServerClient) WaitUntilServerCanConnect()

func (*TestServerClient) WaitUntilServerOnline

func (cli *TestServerClient) WaitUntilServerOnline()

Jump to

Keyboard shortcuts

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