File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
exporter/opentelemetry-exporter-otlp/tests Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ import os
15
16
from collections import OrderedDict
16
17
from unittest import TestCase
17
18
from unittest .mock import patch
44
45
from opentelemetry .sdk .metrics .export .aggregate import SumAggregator
45
46
from opentelemetry .sdk .resources import Resource as SDKResource
46
47
48
+ THIS_DIR = os .path .dirname (__file__ )
49
+
47
50
48
51
class TestOTLPMetricExporter (TestCase ):
49
52
@patch ("opentelemetry.sdk.metrics.export.aggregate.time_ns" )
@@ -75,7 +78,8 @@ def tearDown(self):
75
78
"os.environ" ,
76
79
{
77
80
"OTEL_EXPORTER_OTLP_METRIC_ENDPOINT" : "collector:55680" ,
78
- "OTEL_EXPORTER_OTLP_METRIC_CERTIFICATE" : "fixtures/test.cert" ,
81
+ "OTEL_EXPORTER_OTLP_METRIC_CERTIFICATE" : THIS_DIR
82
+ + "/fixtures/test.cert" ,
79
83
"OTEL_EXPORTER_OTLP_METRIC_HEADERS" : "key1:value1;key2:value2" ,
80
84
"OTEL_EXPORTER_OTLP_METRIC_TIMEOUT" : "10" ,
81
85
},
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ import os
15
16
from collections import OrderedDict
16
17
from concurrent .futures import ThreadPoolExecutor
17
18
from unittest import TestCase
53
54
)
54
55
from opentelemetry .sdk .util .instrumentation import InstrumentationInfo
55
56
57
+ THIS_DIR = os .path .dirname (__file__ )
58
+
56
59
57
60
class TraceServiceServicerUNAVAILABLEDelay (TraceServiceServicer ):
58
61
# pylint: disable=invalid-name,unused-argument,no-self-use
@@ -165,7 +168,8 @@ def tearDown(self):
165
168
"os.environ" ,
166
169
{
167
170
"OTEL_EXPORTER_OTLP_SPAN_ENDPOINT" : "collector:55680" ,
168
- "OTEL_EXPORTER_OTLP_SPAN_CERTIFICATE" : "fixtures/test.cert" ,
171
+ "OTEL_EXPORTER_OTLP_SPAN_CERTIFICATE" : THIS_DIR
172
+ + "/fixtures/test.cert" ,
169
173
"OTEL_EXPORTER_OTLP_SPAN_HEADERS" : "key1:value1;key2:value2" ,
170
174
"OTEL_EXPORTER_OTLP_SPAN_TIMEOUT" : "10" ,
171
175
},
You can’t perform that action at this time.
0 commit comments