go-vitess.v1: gopkg.in/src-d/go-vitess.v1/vt/vtgate/gatewaytest Index | Files

package gatewaytest

import "gopkg.in/src-d/go-vitess.v1/vt/vtgate/gatewaytest"

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


Package Files


func CreateFakeServers Uses

func CreateFakeServers(t *testing.T) (*tabletconntest.FakeQueryService, *topo.Server, string)

CreateFakeServers returns the servers to use for these tests

func TestSuite Uses

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.

Package gatewaytest imports 11 packages (graph). Updated 2019-06-13. Refresh now. Tools for package owners.