Documentation ¶
Overview ¶
Package gatewaytest contains a test suite to run against a Gateway object. We re-use the tabletconn test suite, as it tests all queries and parameters go through. There are two exceptions:
- the health check: we just make that one work, so the gateway knows the tablet is healthy.
- the error type returned: it's not a TabletError any more, but a ShardError. We still check the error code is correct though which is really all we care about.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFakeServers ¶
func CreateFakeServers(t *testing.T) (*tabletconntest.FakeQueryService, *topo.Server, string)
CreateFakeServers returns the servers to use for these tests
func TestSuite ¶
func TestSuite(t *testing.T, name string, g gateway.Gateway, f *tabletconntest.FakeQueryService)
TestSuite executes a set of tests on the provided gateway. The provided gateway needs to be configured with one established connection for tabletconntest.TestTarget.{Keyspace, Shard, TabletType} to the provided tabletconntest.FakeQueryService.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.