test

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package test contains utilities to test topo.Conn implementations. If you are testing your implementation, you will want to call TopoServerTestSuite in your test method. For an example, look at the tests in vitess.io/vitess/go/vt/topo/memorytopo.

Index

Constants

View Source
const LocalCellName = "test"

LocalCellName is the cell name used by this test suite.

Variables

This section is empty.

Functions

func TopoServerTestSuite

func TopoServerTestSuite(t *testing.T, ctx context.Context, factory func() *topo.Server, ignoreList []string)

TopoServerTestSuite runs the full topo.Server/Conn test suite. The factory method should return a topo.Server that has a single cell called LocalCellName. Not all tests are applicable for each Topo server, therefore we provide ignoreList in order to avoid them for given Topo server tests. For example `TryLock` implementation is same as `Lock` for some Topo servers. Hence, for these Topo servers we ignore executing TryLock Tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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