Documentation ¶
Index ¶
- Constants
- func CheckEnvironment() error
- func ExecuteTests(info ClusterInfo, cfg Config, s Suite, factory QueryRunnerFactory) (failed bool)
- func Run(cfg Config) error
- type ClusterInfo
- type ComparingQueryRunner
- type ComparingQueryRunnerFactory
- type Config
- type CreateTableHandler
- type FileReporter
- func (e *FileReporter) AddFailure(err error)
- func (e *FileReporter) AddInfo(info string)
- func (e *FileReporter) AddTestCase(query string, lineNum int)
- func (e *FileReporter) EndTestCase()
- func (e *FileReporter) Errorf(format string, args ...interface{})
- func (e *FileReporter) FailNow()
- func (e *FileReporter) Failed() bool
- func (e *FileReporter) Helper()
- func (e *FileReporter) Report() string
- type FileReporterSuite
- type NullQueryRunner
- type NullQueryRunnerFactory
- type QueryRunner
- type QueryRunnerFactory
- type Reporter
- type Suite
- type Tester
- type Tracer
- type TracerFactory
- type WrongUsageError
- type XMLTestSuite
- func (xml *XMLTestSuite) AddFailure(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) Errorf(format string, args ...interface{})
- func (xml *XMLTestSuite) FailNow()
- func (xml *XMLTestSuite) Failed() bool
- func (xml *XMLTestSuite) Helper()
- func (xml *XMLTestSuite) NewReporterForFile(name string) Reporter
- func (xml *XMLTestSuite) Report() string
Constants ¶
View Source
const PERM os.FileMode = 0o755
Variables ¶
This section is empty.
Functions ¶
func CheckEnvironment ¶
func CheckEnvironment() error
CheckEnvironment checks if the required environment variables are set
func ExecuteTests ¶
func ExecuteTests( info ClusterInfo, cfg Config, s Suite, factory QueryRunnerFactory, ) (failed bool)
Types ¶
type ClusterInfo ¶
type ClusterInfo struct {
// contains filtered or unexported fields
}
func SetupCluster ¶
func SetupCluster(cfg Config) (_ ClusterInfo, err error)
type ComparingQueryRunner ¶
type ComparingQueryRunner struct {
// contains filtered or unexported fields
}
ComparingQueryRunner is a QueryRunner that compares the results of the queries between MySQL and Vitess
type ComparingQueryRunnerFactory ¶
type ComparingQueryRunnerFactory struct{}
func (ComparingQueryRunnerFactory) Close ¶
func (f ComparingQueryRunnerFactory) Close()
func (ComparingQueryRunnerFactory) NewQueryRunner ¶
func (f ComparingQueryRunnerFactory) NewQueryRunner(reporter Reporter, handleCreateTable CreateTableHandler, comparer utils.MySQLCompare, cluster *cluster.LocalProcessCluster, vschema *vindexes.VSchema) QueryRunner
type Config ¶
type Config struct { LogLevel string OLAP bool Sharded bool XUnit bool VSchemaFile string VtExplainVschemaFile string TraceFile string Tests []string NumberOfShards int Compare bool BackupDir string Loader data.Loader }
func (Config) GetNumberOfShards ¶
type CreateTableHandler ¶
type CreateTableHandler func(create *sqlparser.CreateTable) func()
type FileReporter ¶
type FileReporter struct {
// contains filtered or unexported fields
}
func (*FileReporter) AddFailure ¶
func (e *FileReporter) AddFailure(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) Errorf ¶
func (e *FileReporter) Errorf(format string, args ...interface{})
func (*FileReporter) FailNow ¶
func (e *FileReporter) FailNow()
func (*FileReporter) Failed ¶
func (e *FileReporter) Failed() bool
func (*FileReporter) Helper ¶
func (e *FileReporter) Helper()
func (*FileReporter) Report ¶
func (e *FileReporter) Report() string
type FileReporterSuite ¶
type FileReporterSuite struct {
// contains filtered or unexported fields
}
func NewFileReporterSuite ¶
func NewFileReporterSuite(getVschema func() []byte) *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 NullQueryRunner ¶
type NullQueryRunnerFactory ¶
type NullQueryRunnerFactory struct{}
func (NullQueryRunnerFactory) Close ¶
func (NullQueryRunnerFactory) Close()
func (NullQueryRunnerFactory) NewQueryRunner ¶
func (NullQueryRunnerFactory) NewQueryRunner(_ Reporter, handleCreateTable CreateTableHandler, mcmp utils.MySQLCompare, _ *cluster.LocalProcessCluster, _ *vindexes.VSchema) QueryRunner
type QueryRunner ¶
type QueryRunner interface {
// contains filtered or unexported methods
}
type QueryRunnerFactory ¶
type QueryRunnerFactory interface { NewQueryRunner(reporter Reporter, handleCreateTable CreateTableHandler, comparer utils.MySQLCompare, cluster *cluster.LocalProcessCluster, vschema *vindexes.VSchema) QueryRunner Close() }
type TracerFactory ¶
type TracerFactory struct {
// contains filtered or unexported fields
}
func NewTracerFactory ¶
func NewTracerFactory(traceFile *os.File, inner QueryRunnerFactory) *TracerFactory
func (*TracerFactory) Close ¶
func (t *TracerFactory) Close()
func (*TracerFactory) NewQueryRunner ¶
func (t *TracerFactory) NewQueryRunner(reporter Reporter, handleCreateTable CreateTableHandler, comparer utils.MySQLCompare, cluster *cluster.LocalProcessCluster, vschema *vindexes.VSchema) QueryRunner
type WrongUsageError ¶
type WrongUsageError struct {
// contains filtered or unexported fields
}
func (WrongUsageError) Error ¶
func (e WrongUsageError) Error() string
type XMLTestSuite ¶
type XMLTestSuite struct {
// contains filtered or unexported fields
}
func NewXMLTestSuite ¶
func NewXMLTestSuite() *XMLTestSuite
func (*XMLTestSuite) AddFailure ¶
func (xml *XMLTestSuite) AddFailure(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) Errorf ¶
func (xml *XMLTestSuite) Errorf(format string, args ...interface{})
func (*XMLTestSuite) FailNow ¶
func (xml *XMLTestSuite) FailNow()
func (*XMLTestSuite) Failed ¶
func (xml *XMLTestSuite) Failed() bool
func (*XMLTestSuite) Helper ¶
func (xml *XMLTestSuite) Helper()
func (*XMLTestSuite) NewReporterForFile ¶
func (xml *XMLTestSuite) NewReporterForFile(name string) Reporter
func (*XMLTestSuite) Report ¶
func (xml *XMLTestSuite) Report() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.