File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
opentelemetry-distro/tests Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 1414# type: ignore
1515
1616import os
17- from unittest import TestCase
17+ from unittest import TestCase , mock
1818
1919from pkg_resources import DistributionNotFound , require
2020
@@ -33,17 +33,10 @@ def test_package_available(self):
3333 except DistributionNotFound :
3434 self .fail ("opentelemetry-distro not installed" )
3535
36+ @mock .patch .dict ("os.environ" , {}, clear = True )
3637 def test_default_configuration (self ):
3738 distro = OpenTelemetryDistro ()
38- self .assertIsNone (os .environ .get (OTEL_TRACES_EXPORTER ))
39- self .assertIsNone (os .environ .get (OTEL_METRICS_EXPORTER ))
4039 distro .configure ()
41- self .assertEqual (
42- "otlp" , os .environ .get (OTEL_TRACES_EXPORTER )
43- )
44- self .assertEqual (
45- "otlp" , os .environ .get (OTEL_METRICS_EXPORTER )
46- )
47- self .assertEqual (
48- "grpc" , os .environ .get (OTEL_EXPORTER_OTLP_PROTOCOL )
49- )
40+ self .assertEqual ("otlp" , os .environ .get (OTEL_TRACES_EXPORTER ))
41+ self .assertEqual ("otlp" , os .environ .get (OTEL_METRICS_EXPORTER ))
42+ self .assertEqual ("grpc" , os .environ .get (OTEL_EXPORTER_OTLP_PROTOCOL ))
You can’t perform that action at this time.
0 commit comments