integration

package
v1.65.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 39 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CassandraSkippedTests = []string{
	"Tags_+_Operation_name_+_Duration_range",
	"Tags_+_Duration_range",
	"Tags_+_Operation_name_+_max_Duration",
	"Tags_+_max_Duration",
	"Operation_name_+_Duration_range",
	"Duration_range",
	"max_Duration",
	"Multiple_Traces",
}

Functions

func CompareSliceOfTraces

func CompareSliceOfTraces(t *testing.T, expected []*model.Trace, actual []*model.Trace)

CompareSliceOfTraces compares two trace slices

func CompareTraces

func CompareTraces(t *testing.T, expected *model.Trace, actual *model.Trace)

CompareTraces compares two traces

func SkipUnlessEnv added in v1.57.0

func SkipUnlessEnv(t *testing.T, storage ...string)

Types

type QueryFixtures

type QueryFixtures struct {
	Caption          string
	Query            *tracestore.TraceQueryParams
	ExpectedFixtures []string
}

QueryFixtures and TraceFixtures are under ./fixtures/queries.json and ./fixtures/traces/*.json respectively. Each query fixture includes: - Caption: describes the query we are testing - Query: the query we are testing - ExpectedFixture: the trace fixture that we want back from these queries. Queries are not necessarily numbered, but since each query requires a service name, the service name is formatted "query##-service".

func LoadAndParseQueryTestCases

func LoadAndParseQueryTestCases(t *testing.T, queriesFile string) []*QueryFixtures

LoadAndParseQueryTestCases loads and parses query test cases

type RemoteMemoryStorage added in v1.57.0

type RemoteMemoryStorage struct {
	// contains filtered or unexported fields
}

func StartNewRemoteMemoryStorage added in v1.57.0

func StartNewRemoteMemoryStorage(t *testing.T) *RemoteMemoryStorage

func (*RemoteMemoryStorage) Close added in v1.57.0

func (s *RemoteMemoryStorage) Close(t *testing.T)

type StorageIntegration

type StorageIntegration struct {
	TraceWriter       tracestore.Writer
	TraceReader       tracestore.Reader
	ArchiveSpanReader spanstore.Reader
	ArchiveSpanWriter spanstore.Writer
	DependencyWriter  dependencystore.Writer
	DependencyReader  depstore.Reader
	SamplingStore     samplingstore.Store
	Fixtures          []*QueryFixtures

	// TODO: remove this after all storage backends return spanKind from GetOperations
	GetOperationsMissingSpanKind bool

	GetDependenciesReturnsSource bool

	// Skip Archive Test if not supported by the storage backend
	SkipArchiveTest bool

	// List of tests which has to be skipped, it can be regex too.
	SkipList []string

	// CleanUp() should ensure that the storage backend is clean before another test.
	// called either before or after each test, and should be idempotent
	CleanUp func(t *testing.T)
}

StorageIntegration holds components for storage integration test. The intended usage is as follows: - a specific storage implementation declares its own test functions - in those functions it instantiates and populates this struct - it then calls RunAll.

Some implementations may declare multiple tests, with different settings, and RunAll() under different conditions.

func (*StorageIntegration) RunAll added in v1.56.0

func (s *StorageIntegration) RunAll(t *testing.T)

RunAll runs all integration tests

func (*StorageIntegration) RunSpanStoreTests added in v1.57.0

func (s *StorageIntegration) RunSpanStoreTests(t *testing.T)

RunTestSpanstore runs only span related integration tests

Jump to

Keyboard shortcuts

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