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 ¶
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.