testutils

package
v1.5.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateChunks

func CreateChunks(startIndex, batchSize int, from model.Time, through model.Time) ([]string, []chunk.Chunk, error)

CreateChunks creates some chunks for testing

func DefaultSchemaConfig

func DefaultSchemaConfig(kind string) chunk.SchemaConfig

DefaultSchemaConfig returns default schema for use in test fixtures

func Setup

func Setup(fixture Fixture, tableName string) (chunk.IndexClient, chunk.Client, io.Closer, error)

Setup a fixture with initial tables

func SetupTestChunkStore added in v0.7.0

func SetupTestChunkStore() (chunk.Store, error)

func SetupTestChunkStoreWithClients added in v1.4.0

func SetupTestChunkStoreWithClients(indexClient chunk.IndexClient, chunksClient chunk.Client, tableClient chunk.TableClient) (chunk.Store, error)

func SetupTestObjectStore added in v0.7.0

func SetupTestObjectStore() (chunk.ObjectClient, error)

Types

type CloserFunc added in v1.2.0

type CloserFunc func() error

CloserFunc is to io.Closer as http.HandlerFunc is to http.Handler.

func (CloserFunc) Close added in v1.2.0

func (f CloserFunc) Close() error

Close implements io.Closer.

type Fixture

type Fixture interface {
	Name() string
	Clients() (chunk.IndexClient, chunk.Client, chunk.TableClient, chunk.SchemaConfig, io.Closer, error)
}

Fixture type for per-backend testing.

Jump to

Keyboard shortcuts

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