gatewaytest

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 11 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