integration

package
v0.16.8 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinPort = 2048
	MaxPort = 16384
)

Variables

This section is empty.

Functions

func GetPGParameters added in v0.7.0

func GetPGParameters(q Querier) (common.Parameters, error)

func GetSystemData added in v0.9.0

func GetSystemData(q ReplQuerier) (*pg.SystemData, error)

func GetXLogPos added in v0.9.0

func GetXLogPos(q ReplQuerier) (uint64, error)

func StolonCtl added in v0.5.0

func StolonCtl(t *testing.T, clusterName string, storeBackend store.Backend, storeEndpoints string, a ...string) error

func WaitClusterDataEnabledProxiesNum added in v0.10.0

func WaitClusterDataEnabledProxiesNum(e *store.KVBackedStore, n int, timeout time.Duration) error

func WaitClusterDataKeeperInitialized added in v0.5.0

func WaitClusterDataKeeperInitialized(keeperUID string, e *store.KVBackedStore, timeout time.Duration) error

func WaitClusterDataKeepers added in v0.6.0

func WaitClusterDataKeepers(keepersUIDs []string, e *store.KVBackedStore, timeout time.Duration) error

func WaitClusterDataMaster added in v0.5.0

func WaitClusterDataMaster(master string, e *store.KVBackedStore, timeout time.Duration) error

func WaitClusterDataSynchronousStandbys added in v0.5.0

func WaitClusterDataSynchronousStandbys(synchronousStandbys []string, e *store.KVBackedStore, timeout time.Duration) error

WaitClusterDataSynchronousStandbys waits for: * synchronous standby defined in masterdb spec * synchronous standby reported from masterdb status

func WaitClusterDataUpdated added in v0.10.0

func WaitClusterDataUpdated(e *store.KVBackedStore, timeout time.Duration) error

func WaitClusterDataWithMaster added in v0.5.0

func WaitClusterDataWithMaster(e *store.KVBackedStore, timeout time.Duration) (string, error)

func WaitClusterPhase added in v0.5.0

func WaitClusterPhase(e *store.KVBackedStore, phase cluster.ClusterPhase, timeout time.Duration) error

func WaitClusterSyncedXLogPos added in v0.6.0

func WaitClusterSyncedXLogPos(keepers []*TestKeeper, xLogPos uint64, e *store.KVBackedStore, timeout time.Duration) error

WaitClusterSyncedXLogPos waits for all the specified keepers to have the same reported XLogPos and that it's >= than master XLogPos

func WaitNumDBs added in v0.5.0

func WaitNumDBs(e *store.KVBackedStore, n int, timeout time.Duration) error

func WaitStandbyKeeper added in v0.5.0

func WaitStandbyKeeper(e *store.KVBackedStore, keeperUID string, timeout time.Duration) error

Types

type Process

type Process struct {
	// contains filtered or unexported fields
}

func (*Process) Kill

func (p *Process) Kill()

func (*Process) Signal

func (p *Process) Signal(sig os.Signal) error

func (*Process) Start

func (p *Process) Start() error

func (*Process) StartExpect

func (p *Process) StartExpect() error

func (*Process) Stop

func (p *Process) Stop()

func (*Process) Wait

func (p *Process) Wait(timeout time.Duration) error

type Querier added in v0.7.0

type Querier interface {
	Exec(query string, args ...interface{}) (sql.Result, error)
	Query(query string, args ...interface{}) (*sql.Rows, error)
}

type ReplQuerier added in v0.13.0

type ReplQuerier interface {
	ReplQuery(query string, args ...interface{}) (*sql.Rows, error)
}

type TestKeeper

type TestKeeper struct {
	Process
	// contains filtered or unexported fields
}

func NewTestKeeper

func NewTestKeeper(t *testing.T, dir, clusterName, pgSUUsername, pgSUPassword, pgReplUsername, pgReplPassword string, storeBackend store.Backend, storeEndpoints string, a ...string) (*TestKeeper, error)

func NewTestKeeperWithID

func NewTestKeeperWithID(t *testing.T, dir, uid, clusterName, pgSUUsername, pgSUPassword, pgReplUsername, pgReplPassword string, storeBackend store.Backend, storeEndpoints string, a ...string) (*TestKeeper, error)

func (*TestKeeper) CheckPoint added in v0.8.0

func (tk *TestKeeper) CheckPoint() error

func (*TestKeeper) Exec

func (tk *TestKeeper) Exec(query string, args ...interface{}) (sql.Result, error)

func (*TestKeeper) GetPGParameters added in v0.5.0

func (tk *TestKeeper) GetPGParameters() (common.Parameters, error)

func (*TestKeeper) GetPGProcess

func (tk *TestKeeper) GetPGProcess() (*os.Process, error)

func (*TestKeeper) GetPrimaryConninfo added in v0.6.0

func (tk *TestKeeper) GetPrimaryConninfo() (pg.ConnParams, error)

func (*TestKeeper) PGDataVersion added in v0.6.0

func (tk *TestKeeper) PGDataVersion() (int, int, error)

func (*TestKeeper) Query

func (tk *TestKeeper) Query(query string, args ...interface{}) (*sql.Rows, error)

func (*TestKeeper) ReplQuery added in v0.9.0

func (tk *TestKeeper) ReplQuery(query string, args ...interface{}) (*sql.Rows, error)

func (*TestKeeper) SignalPG

func (tk *TestKeeper) SignalPG(sig os.Signal) error

func (*TestKeeper) SwitchWals added in v0.7.0

func (tk *TestKeeper) SwitchWals(times int) error

func (*TestKeeper) WaitDBDown

func (tk *TestKeeper) WaitDBDown(timeout time.Duration) error

func (*TestKeeper) WaitDBRole added in v0.6.0

func (tk *TestKeeper) WaitDBRole(r common.Role, ptk *TestKeeper, timeout time.Duration) error

func (*TestKeeper) WaitDBUp

func (tk *TestKeeper) WaitDBUp(timeout time.Duration) error

type TestProxy

type TestProxy struct {
	Process
	// contains filtered or unexported fields
}

func NewTestProxy

func NewTestProxy(t *testing.T, dir string, clusterName, pgSUUsername, pgSUPassword, pgReplUsername, pgReplPassword string, storeBackend store.Backend, storeEndpoints string, a ...string) (*TestProxy, error)

func (*TestProxy) CheckListening added in v0.7.0

func (tp *TestProxy) CheckListening() bool

func (*TestProxy) Exec added in v0.7.0

func (tp *TestProxy) Exec(query string, args ...interface{}) (sql.Result, error)

func (*TestProxy) GetPGParameters added in v0.7.0

func (tp *TestProxy) GetPGParameters() (common.Parameters, error)

func (*TestProxy) Query added in v0.7.0

func (tp *TestProxy) Query(query string, args ...interface{}) (*sql.Rows, error)

func (*TestProxy) ReplQuery added in v0.9.0

func (tp *TestProxy) ReplQuery(query string, args ...interface{}) (*sql.Rows, error)

func (*TestProxy) WaitListening

func (tp *TestProxy) WaitListening(timeout time.Duration) error

func (*TestProxy) WaitNotListening

func (tp *TestProxy) WaitNotListening(timeout time.Duration) error

func (*TestProxy) WaitRightMaster added in v0.7.0

func (tp *TestProxy) WaitRightMaster(tk *TestKeeper, timeout time.Duration) error

type TestSentinel

type TestSentinel struct {
	Process
	// contains filtered or unexported fields
}

func NewTestSentinel

func NewTestSentinel(t *testing.T, dir string, clusterName string, storeBackend store.Backend, storeEndpoints string, a ...string) (*TestSentinel, error)

type TestStore added in v0.3.0

type TestStore struct {
	Process
	// contains filtered or unexported fields
}

func NewTestConsul added in v0.3.0

func NewTestConsul(t *testing.T, dir string, a ...string) (*TestStore, error)

func NewTestEtcd

func NewTestEtcd(t *testing.T, dir string, backend store.Backend, a ...string) (*TestStore, error)

func NewTestStore added in v0.3.0

func NewTestStore(t *testing.T, dir string, a ...string) (*TestStore, error)

func (*TestStore) WaitDown added in v0.3.0

func (ts *TestStore) WaitDown(timeout time.Duration) error

func (*TestStore) WaitUp added in v0.3.0

func (ts *TestStore) WaitUp(timeout time.Duration) error

Jump to

Keyboard shortcuts

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