integration

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: AGPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EachPyroscopeTest

func EachPyroscopeTest(t *testing.T, f func(p *PyroscopeTest, t *testing.T))

func GetFreePorts

func GetFreePorts(len int) (ports []int, err error)

GetFreePorts returns a number of free local port for the tests to listen on. This will make sure the returned ports do not overlap, by stopping to listen once all ports are allocated

Note: This function should only be used in integration tests. Use in-memory network connections in unittests.

Types

type PyroscopeTest

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

func (*PyroscopeTest) Configure

func (p *PyroscopeTest) Configure(t *testing.T, v2 bool) *PyroscopeTest

func (*PyroscopeTest) Ingest

func (p *PyroscopeTest) Ingest(t *testing.T, req *http.Request, expectStatus int)

func (*PyroscopeTest) Metrics

func (p *PyroscopeTest) Metrics(t testing.TB, keep func(string) bool) string

func (*PyroscopeTest) NewRequestBuilder

func (p *PyroscopeTest) NewRequestBuilder(t *testing.T) *RequestBuilder

func (*PyroscopeTest) TempAppName

func (p *PyroscopeTest) TempAppName() string

func (*PyroscopeTest) URL

func (p *PyroscopeTest) URL() string

type RequestBuilder

type RequestBuilder struct {
	AppName string
	// contains filtered or unexported fields
}

func (*RequestBuilder) IngestJFRRequestBody

func (b *RequestBuilder) IngestJFRRequestBody(jfr []byte, labels []byte) *http.Request

func (*RequestBuilder) IngestJFRRequestFiles

func (b *RequestBuilder) IngestJFRRequestFiles(jfrPath, labelsPath string) *http.Request

func (*RequestBuilder) IngestPPROFRequest

func (b *RequestBuilder) IngestPPROFRequest(profilePath, prevProfilePath, sampleTypeConfigPath string) *http.Request

func (*RequestBuilder) IngestSpeedscopeRequest

func (b *RequestBuilder) IngestSpeedscopeRequest(speedscopePath string) *http.Request

func (*RequestBuilder) OtelPushClient

func (b *RequestBuilder) OtelPushClient() profilesv1.ProfilesServiceClient

func (*RequestBuilder) OtelPushHTTPJSON

func (b *RequestBuilder) OtelPushHTTPJSON(profile *profilesv1.ExportProfilesServiceRequest) *http.Request

OtelPushHTTPJSON creates an HTTP request for OTLP ingestion with JSON content type

func (*RequestBuilder) OtelPushHTTPProtobuf

func (b *RequestBuilder) OtelPushHTTPProtobuf(profile *profilesv1.ExportProfilesServiceRequest) *http.Request

OtelPushHTTPProtobuf creates an HTTP request for OTLP ingestion with binary/protobuf content type

func (*RequestBuilder) Push

func (b *RequestBuilder) Push(request *connect.Request[pushv1.PushRequest], expectStatus int, expectedError string)

func (*RequestBuilder) PushClient

func (*RequestBuilder) PushPPROFRequestFromBytes

func (b *RequestBuilder) PushPPROFRequestFromBytes(rawProfile []byte, name string) *connect.Request[pushv1.PushRequest]

func (*RequestBuilder) PushPPROFRequestFromFile

func (b *RequestBuilder) PushPPROFRequestFromFile(file string, metric string) *connect.Request[pushv1.PushRequest]

func (*RequestBuilder) QueryClient

func (*RequestBuilder) Render

func (*RequestBuilder) SelectMergeProfile

func (b *RequestBuilder) SelectMergeProfile(metric string, query map[string]string) *connect.Response[profilev1.Profile]

func (*RequestBuilder) Spy

func (b *RequestBuilder) Spy(spy string) *RequestBuilder

type TestDebuginfodServer

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

func NewTestDebuginfodServer

func NewTestDebuginfodServer() (*TestDebuginfodServer, error)

func (*TestDebuginfodServer) AddDebugFile

func (s *TestDebuginfodServer) AddDebugFile(buildID, filePath string)

func (*TestDebuginfodServer) Start

func (s *TestDebuginfodServer) Start() error

func (*TestDebuginfodServer) Stop

func (s *TestDebuginfodServer) Stop() error

func (*TestDebuginfodServer) URL

func (s *TestDebuginfodServer) URL() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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