sinktest

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package sinktest contains utility types for writing Replicator tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDiagnostics

func CheckDiagnostics(ctx context.Context, t *testing.T, diags *diag.Diagnostics)

CheckDiagnostics ensures that all diagnostic data can be serialized to JSON.

func JumbleIdent

func JumbleIdent(id ident.Ident) ident.Ident

JumbleIdent returns a case-jumbled version of the Ident.

func JumbleSchema

func JumbleSchema(sch ident.Schema) ident.Schema

JumbleSchema returns a case-jumbled version of the Schema.

func JumbleTable

func JumbleTable(tbl ident.Table) ident.Table

JumbleTable returns a case-jumbled version of the Table.

func TableBatchOf

func TableBatchOf(table ident.Table, time hlc.Time, data []types.Mutation) *types.TableBatch

TableBatchOf is a convenience method for creating a types.TableBatch instance. The timestamp of each mutation will be set to the time argument, to easily create a well-formed batch.

Types

type SourceSchema

type SourceSchema ident.Schema

SourceSchema is an injection point that holds the name of a unique table schema in the source database in which to store user data.

func (SourceSchema) Schema

func (t SourceSchema) Schema() ident.Schema

Schema returns the underlying database identifier.

type TargetSchema

type TargetSchema ident.Schema

TargetSchema is an injection point that holds the name of a unique table schema in the source database in which to store user data.

func (TargetSchema) Schema

func (t TargetSchema) Schema() ident.Schema

Schema returns the underlying database identifier.

Directories

Path Synopsis
Package all contains a test rig for all services.
Package all contains a test rig for all services.
Package base provides enough functionality to connect to a database, but does not provide any other services.
Package base provides enough functionality to connect to a database, but does not provide any other services.
Package mutations contains a helper to generate mutations.
Package mutations contains a helper to generate mutations.
Package recorder contains an acceptor implementation that records the method calls it sees.
Package recorder contains an acceptor implementation that records the method calls it sees.
Package scripttest contains reusable test helpers for logical-replication tests.
Package scripttest contains reusable test helpers for logical-replication tests.

Jump to

Keyboard shortcuts

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