Skip to content

Commit

Permalink
Adding test code
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycody committed May 18, 2022
1 parent eca07a5 commit adc914f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
OTEL_EXPORTER_JAEGER_ENDPOINT,
OTEL_EXPORTER_JAEGER_TIMEOUT,
OTEL_RESOURCE_ATTRIBUTES,
OTEL_EXPORTER_JAEGER_GRPC_INSECURE,
)
from opentelemetry.sdk.resources import SERVICE_NAME, Resource
from opentelemetry.sdk.trace import TracerProvider
Expand Down Expand Up @@ -87,6 +88,7 @@ def test_constructor_by_environment_variables(self):
+ "/certs/cred.cert",
OTEL_RESOURCE_ATTRIBUTES: "service.name=my-opentelemetry-jaeger",
OTEL_EXPORTER_JAEGER_TIMEOUT: "5",
OTEL_EXPORTER_JAEGER_GRPC_INSECURE: "False",
},
)

Expand All @@ -99,6 +101,7 @@ def test_constructor_by_environment_variables(self):
self.assertEqual(exporter.collector_endpoint, collector_endpoint)
self.assertEqual(exporter._timeout, 5)
self.assertIsNotNone(exporter.credentials)
self.assertEqual(exporter.insecure, False)
env_patch.stop()

# pylint: disable=too-many-locals,too-many-statements
Expand Down

0 comments on commit adc914f

Please sign in to comment.