Skip to content

Commit 7d91585

Browse files
committed
Add back missing test
1 parent 8732baa commit 7d91585

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,18 @@ def test_otlp_exporter_otlp_compression_unspecified(
271271
"localhost:4317", compression=Compression.NoCompression
272272
)
273273

274+
# pylint: disable=no-self-use, disable=unused-argument
275+
@patch(
276+
"opentelemetry.exporter.otlp.proto.grpc.exporter.ssl_channel_credentials"
277+
)
278+
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter.secure_channel")
279+
@patch.dict("os.environ", {})
280+
def test_no_credentials_ssl_channel_called(
281+
self, secure_channel, mock_ssl_channel
282+
):
283+
OTLPSpanExporterForTesting(insecure=False)
284+
self.assertTrue(mock_ssl_channel.called)
285+
274286
# pylint: disable=no-self-use
275287
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter.insecure_channel")
276288
@patch.dict("os.environ", {OTEL_EXPORTER_OTLP_COMPRESSION: "gzip"})

0 commit comments

Comments
 (0)