gatewaytest

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2016 License: BSD-3-Clause Imports: 13 Imported by: 0

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.

Jump to

Keyboard shortcuts

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