HttpEndpointResolverTest
extends TestCase
-
#[CoversClass]
-
\OpenTelemetry\Contrib\Otlp\HttpEndpointResolver::class
Table of Contents
Constants
-
DEFAULT_PATHS
= ['trace' => 'v1/traces', 'metrics' => 'v1/metrics', 'logs' => 'v1/logs']
-
SIGNALS
= ['trace', 'metrics', 'logs']
-
VALID_SCHEMES
= ['http', 'https']
Methods
-
provideEndpoints()
: Generator
-
provideReferences()
: Generator
-
provideSchemes()
: Generator
-
provideSignals()
: Generator
-
test_normalize()
: void
-
test_normalize_throws_exception_on_invalid_scheme()
: void
-
test_normalize_throws_exception_on_invalid_signal()
: void
-
test_normalize_throws_exception_on_invalid_url()
: void
-
test_references_are_correct()
: void
DEFAULT_PATHS
private
mixed
DEFAULT_PATHS
= ['trace' => 'v1/traces', 'metrics' => 'v1/metrics', 'logs' => 'v1/logs']
SIGNALS
private
mixed
SIGNALS
= ['trace', 'metrics', 'logs']
VALID_SCHEMES
private
mixed
VALID_SCHEMES
= ['http', 'https']
provideEndpoints()
public
static provideEndpoints() : Generator
provideReferences()
public
static provideReferences() : Generator
provideSchemes()
public
static provideSchemes() : Generator
provideSignals()
public
static provideSignals() : Generator
test_normalize()
public
test_normalize(string $baseEndpoint, string $signal, string $expectedEndpoint) : void
Parameters
-
$baseEndpoint
: string
-
-
$signal
: string
-
-
$expectedEndpoint
: string
-
-
#[DataProvider]
-
'provideEndpoints'
test_normalize_throws_exception_on_invalid_scheme()
public
test_normalize_throws_exception_on_invalid_scheme(string $signal) : void
Parameters
-
$signal
: string
-
-
#[DataProvider]
-
'provideSignals'
test_normalize_throws_exception_on_invalid_signal()
public
test_normalize_throws_exception_on_invalid_signal(string $scheme) : void
Parameters
-
$scheme
: string
-
-
#[DataProvider]
-
'provideSchemes'
test_normalize_throws_exception_on_invalid_url()
public
test_normalize_throws_exception_on_invalid_url(string $signal) : void
Parameters
-
$signal
: string
-
-
#[DataProvider]
-
'provideSignals'
test_references_are_correct()
public
test_references_are_correct(array<string|int, mixed> $values, array<string|int, mixed> $reference) : void
Parameters
-
$values
: array<string|int, mixed>
-
-
$reference
: array<string|int, mixed>
-
-
#[DataProvider]
-
'provideReferences'