`tests`: added missing tests
A couple of the exporters were not being tested by the opentelemetry-exporter-otlp package tests.
import unittest
+from opentelemetry.exporter.otlp.proto.grpc._log_exporter import (
+ OTLPLogExporter,
+)
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import (
OTLPSpanExporter,
)
+from opentelemetry.exporter.otlp.proto.http.trace_exporter import (
+ OTLPSpanExporter as HTTPSpanExporter,
+)
class TestOTLPExporters(unittest.TestCase):
def test_constructors(self):
+ for exporter in [OTLPSpanExporter, HTTPSpanExporter, OTLPLogExporter]:
try:
- OTLPSpanExporter()
+ exporter()
except Exception: # pylint: disable=broad-except
self.fail(
- "Unexpected exception raised when instantiating OTLPSpanExporter"
+ f"Unexpected exception raised when instantiating {exporter.__name__}"
)
