Skip to content

Commit

Permalink
test(OpenTelemetry/Transport): assert content type value
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelreyrol committed Dec 22, 2024
1 parent 98b3adf commit 831502a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/DependencyInjection/OpenTelemetryExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ protected function loadInternal(array $mergedConfig, ContainerBuilder $container
*/
private function loadServiceParams(array $config, ContainerBuilder $container): void
{
// TODO These values are not passed to the OpenTelemetry SDK
$container->setParameter('open_telemetry.service.namespace', $config['namespace']);
$container->setParameter('open_telemetry.service.name', $config['name']);
$container->setParameter('open_telemetry.service.version', $config['version']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public function testCreateTransportFromExporter(
self::assertSame($shouldSupport, $factory->supports($endpoint, $options));

if ($shouldSupport) {
$factory->createTransport($endpoint, $options);
$transport = $factory->createTransport($endpoint, $options);
self::assertSame('application/x-protobuf', $transport->contentType());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public function testCreateTransportFromExporter(
self::assertSame($shouldSupport, $factory->supports($endpoint, $options));

if ($shouldSupport) {
$factory->createTransport($endpoint, $options);
$transport = $factory->createTransport($endpoint, $options);
self::assertSame('application/json', $transport->contentType());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public function testCreateTransportFromExporter(
self::assertSame($shouldSupport, $factory->supports($endpoint, $options));

if ($shouldSupport) {
$factory->createTransport($endpoint, $options);
$transport = $factory->createTransport($endpoint, $options);
self::assertSame('application/json', $transport->contentType());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public function testCreateTransportFromExporter(
self::assertSame($shouldSupport, $factory->supports($endpoint, $options));

if ($shouldSupport) {
$factory->createTransport($endpoint, $options);
$transport = $factory->createTransport($endpoint, $options);
self::assertSame('application/json', $transport->contentType());
}
}

Expand Down

0 comments on commit 831502a

Please sign in to comment.