integration

package
v1.57.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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            *spanstore.TraceQueryParameters
	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 {
	SpanWriter        spanstore.Writer
	SpanReader        spanstore.Reader
	ArchiveSpanReader spanstore.Reader
	ArchiveSpanWriter spanstore.Writer
	DependencyWriter  dependencystore.Writer
	DependencyReader  dependencystore.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

	// TODO: remove this after upstream issue in OTEL jaeger translator is fixed
	// Skip testing trace binary tags, logs, and process
	SkipBinaryAttrs 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 declate multuple 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