Documentation
¶
Index ¶
- Variables
- func CheckEnvironment() error
- func NewTester(name string, reporter Reporter, clusterInstance *cluster.LocalProcessCluster, ...) *tester
- func ParseQueries(qs ...query) ([]query, error)
- func String(cmd CmdType) string
- type CmdType
- type FileReporter
- type FileReporterSuite
- type Reporter
- type Suite
- type XMLTestSuite
- func (xml *XMLTestSuite) AddFailure(vschema vindexes.VSchema, err error)
- func (xml *XMLTestSuite) AddInfo(info string)
- func (xml *XMLTestSuite) AddTestCase(query string, lineNo int)
- func (xml *XMLTestSuite) Close() string
- func (xml *XMLTestSuite) CloseReportForFile()
- func (xml *XMLTestSuite) EndTestCase()
- func (xml *XMLTestSuite) Failed() bool
- func (xml *XMLTestSuite) NewReporterForFile(name string) Reporter
- func (xml *XMLTestSuite) Report() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidCommand = errors.New("Found line beginning with -- that didn't contain a valid mysqltest command, check your syntax or use # if you intended to write comment")
View Source
var PERM os.FileMode = 0755
Functions ¶
func CheckEnvironment ¶
func CheckEnvironment() error
CheckEnvironment checks if the required environment variables are set
func ParseQueries ¶
func ParseQueries(qs ...query) ([]query, error)
ParseQueries parses an array of string into an array of query object. Note: a query statement may reside in several lines.
Types ¶
type CmdType ¶
type CmdType int
const ( Q_CONNECTION CmdType = iota + 1 Q_QUERY Q_CONNECT Q_SLEEP Q_REAL_SLEEP Q_INC Q_DEC Q_SOURCE Q_DISCONNECT Q_LET Q_ECHO Q_WHILE Q_END_BLOCK Q_SYSTEM Q_RESULT Q_REQUIRE Q_SAVE_MASTER_POS Q_SYNC_WITH_MASTER Q_SYNC_SLAVE_WITH_MASTER Q_ERROR Q_SEND Q_REAP Q_DIRTY_CLOSE Q_REPLACE Q_REPLACE_COLUMN Q_PING Q_EVAL Q_EVAL_RESULT Q_ENABLE_QUERY_LOG Q_DISABLE_QUERY_LOG Q_ENABLE_RESULT_LOG Q_DISABLE_RESULT_LOG Q_ENABLE_CONNECT_LOG Q_DISABLE_CONNECT_LOG Q_WAIT_FOR_SLAVE_TO_STOP Q_ENABLE_WARNINGS Q_DISABLE_WARNINGS Q_ENABLE_INFO Q_DISABLE_INFO Q_ENABLE_SESSION_TRACK_INFO Q_DISABLE_SESSION_TRACK_INFO Q_ENABLE_METADATA Q_DISABLE_METADATA Q_EXEC Q_EXECW Q_DELIMITER Q_DISABLE_ABORT_ON_ERROR Q_ENABLE_ABORT_ON_ERROR Q_DISPLAY_VERTICAL_RESULTS Q_DISPLAY_HORIZONTAL_RESULTS Q_QUERY_VERTICAL Q_QUERY_HORIZONTAL Q_SORTED_RESULT Q_LOWERCASE Q_START_TIMER Q_END_TIMER Q_CHARACTER_SET Q_DISABLE_PS_PROTOCOL Q_ENABLE_PS_PROTOCOL Q_DISABLE_RECONNECT Q_ENABLE_RECONNECT Q_IF Q_DISABLE_PARSING Q_ENABLE_PARSING Q_REPLACE_REGEX Q_REPLACE_NUMERIC_ROUND Q_REMOVE_FILE Q_FILE_EXIST Q_WRITE_FILE Q_COPY_FILE Q_PERL Q_DIE Q_EXIT Q_SKIP Q_CHMOD_FILE Q_APPEND_FILE Q_CAT_FILE Q_DIFF_FILES Q_SEND_QUIT Q_CHANGE_USER Q_MKDIR Q_RMDIR Q_LIST_FILES Q_LIST_FILES_WRITE_FILE Q_LIST_FILES_APPEND_FILE Q_SEND_SHUTDOWN Q_SHUTDOWN_SERVER Q_RESULT_FORMAT_VERSION Q_MOVE_FILE Q_REMOVE_FILES_WILDCARD Q_SEND_EVAL Q_OUTPUT /* redirect output to a file */ Q_RESET_CONNECTION Q_SINGLE_QUERY Q_BEGIN_CONCURRENT Q_END_CONCURRENT Q_UNKNOWN Q_COMMENT Q_COMMENT_WITH_COMMAND Q_EMPTY_LINE Q_SKIP_IF_BELOW_VERSION Q_VEXPLAIN Q_WAIT_FOR_AUTHORITATIVE )
Different query command type
type FileReporter ¶
type FileReporter struct {
// contains filtered or unexported fields
}
func (*FileReporter) AddFailure ¶
func (e *FileReporter) AddFailure(vschema vindexes.VSchema, err error)
func (*FileReporter) AddInfo ¶
func (e *FileReporter) AddInfo(info string)
func (*FileReporter) AddTestCase ¶
func (e *FileReporter) AddTestCase(query string, lineNum int)
func (*FileReporter) EndTestCase ¶
func (e *FileReporter) EndTestCase()
func (*FileReporter) Failed ¶
func (e *FileReporter) Failed() bool
func (*FileReporter) Report ¶
func (e *FileReporter) Report() string
type FileReporterSuite ¶
type FileReporterSuite struct{}
func NewFileReporterSuite ¶
func NewFileReporterSuite() *FileReporterSuite
func (*FileReporterSuite) Close ¶
func (frs *FileReporterSuite) Close() string
func (*FileReporterSuite) CloseReportForFile ¶
func (frs *FileReporterSuite) CloseReportForFile()
func (*FileReporterSuite) NewReporterForFile ¶
func (frs *FileReporterSuite) NewReporterForFile(name string) Reporter
type XMLTestSuite ¶
type XMLTestSuite struct {
// contains filtered or unexported fields
}
func NewXMLTestSuite ¶
func NewXMLTestSuite() *XMLTestSuite
func (*XMLTestSuite) AddFailure ¶
func (xml *XMLTestSuite) AddFailure(vschema vindexes.VSchema, err error)
func (*XMLTestSuite) AddInfo ¶
func (xml *XMLTestSuite) AddInfo(info string)
func (*XMLTestSuite) AddTestCase ¶
func (xml *XMLTestSuite) AddTestCase(query string, lineNo int)
func (*XMLTestSuite) Close ¶
func (xml *XMLTestSuite) Close() string
func (*XMLTestSuite) CloseReportForFile ¶
func (xml *XMLTestSuite) CloseReportForFile()
func (*XMLTestSuite) EndTestCase ¶
func (xml *XMLTestSuite) EndTestCase()
func (*XMLTestSuite) Failed ¶
func (xml *XMLTestSuite) Failed() bool
func (*XMLTestSuite) NewReporterForFile ¶
func (xml *XMLTestSuite) NewReporterForFile(name string) Reporter
func (*XMLTestSuite) Report ¶
func (xml *XMLTestSuite) Report() string
Click to show internal directories.
Click to hide internal directories.