integration

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

Integration tests

This directory contains Prometheus, Tempo and Loki API integration tests.

Docker is required to run.

Getting traces from tests for debugging

Run a local Jaeger instance:

docker run --rm -d --name jaeger -p 16686:16686 -p 4317:4317 jaegertracing/all-in-one:latest

Run wanted test with E2E_TRACES_EXPORTER:

E2E_TRACES_EXPORTER='localhost:4317' E2E='1' go test -v -run "TestCH/QueryRange" ./integration/prome2e

Open Jaeger UI http://localhost:16686/.

Documentation

Overview

Package integration wraps integration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntegrationProvider added in v0.13.0

func IntegrationProvider(t *testing.T) trace.TracerProvider

IntegrationProvider returns trace exporter for debugging.

E2E_TRACES_EXPORTER enironment variable sets gRPC OTLP receiver address to export traces.

func Logger added in v0.12.0

func Logger(t *testing.T) *zap.Logger

Logger creates a new zap.Logger to use in tests.

func Skip

func Skip(t testing.TB)

Skip test if E2E env is not set.

Types

type Provider

type Provider struct {
	*sdktrace.TracerProvider
	Exporter *tracetest.InMemoryExporter
}

Provider is a helper for tests providing a TracerProvider and an InMemoryExporter.

func NewProvider

func NewProvider() *Provider

NewProvider initializes and returns a new Provider along with an exporter.

func (*Provider) Flush

func (p *Provider) Flush()

Flush forces a flush of all finished spans.

func (*Provider) Reset

func (p *Provider) Reset()

Reset clears the current in-memory storage.

Directories

Path Synopsis
Package lokie2e provides scripts for E2E testing Loki API implementation.
Package lokie2e provides scripts for E2E testing Loki API implementation.
Package prome2e provides scripts for E2E testing Prometheus API implementation.
Package prome2e provides scripts for E2E testing Prometheus API implementation.
Package requirex provides additional testing helpers.
Package requirex provides additional testing helpers.
Package tempoe2e provides scripts for E2E testing Tempo API implementation.
Package tempoe2e provides scripts for E2E testing Tempo API implementation.

Jump to

Keyboard shortcuts

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