testenv

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package testenv supplies test functions for testing vstreamer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	KeyspaceName string
	ShardName    string
	Cells        []string

	TabletEnv    tabletenv.Env
	TopoServ     *topo.Server
	SrvTopo      srvtopo.Server
	Dbcfgs       *dbconfigs.DBConfigs
	Mysqld       *mysqlctl.Mysqld
	SchemaEngine *schema.Engine
	Flavor       string
	// MySQL and Percona are considered equivalent here and both called mysql
	DBType         string
	DBMajorVersion int
	DBMinorVersion int
	DBPatchVersion int
	// contains filtered or unexported fields
}

Env contains all the env vars for a test against a mysql instance.

func Init

func Init() (*Env, error)

Init initializes an Env.

func (*Env) Close

func (te *Env) Close()

Close tears down TestEnv.

func (*Env) RemoveAnyDeprecatedDisplayWidths added in v0.12.1

func (te *Env) RemoveAnyDeprecatedDisplayWidths(orig string) string

In MySQL 8.0 and later information_schema no longer contains the display width for integer types and as of 8.0.19 for year types as this was an unnecessary headache because it can only serve to confuse if the display width is less than the type width (8.0 no longer supports the 2 digit YEAR). So if the test is running against MySQL 8.0 or later then you should use this function to replace e.g. `int([0-9]*)` with `int` in the expected results string that we define in the test.

func (*Env) SetVSchema

func (te *Env) SetVSchema(vs string) error

SetVSchema sets the vschema for the test keyspace.

Jump to

Keyboard shortcuts

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