From 95de5e92b2a181984feccc752a4e10702fc7efcc Mon Sep 17 00:00:00 2001 From: wasup-yash Date: Tue, 20 Aug 2024 21:10:51 +0530 Subject: [PATCH] updated test for otlp bytes Signed-off-by: wasup-yash --- .../tests/test_attribute_encoder.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_attribute_encoder.py b/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_attribute_encoder.py index 01856611036..be4f58367cc 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_attribute_encoder.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_attribute_encoder.py @@ -36,6 +36,7 @@ def test_encode_attributes_all_kinds(self): "greet": ["hola", "bonjour"], # Sequence[str] "data": [1, 2], # Sequence[int] "data_granular": [1.4, 2.4], # Sequence[float] + "binary_data": b'x00\x01\x02' #bytes } ) self.assertEqual( @@ -80,6 +81,10 @@ def test_encode_attributes_all_kinds(self): ) ), ), + PB2AnyValue( + key="binary_data", + value=PB2AnyValue(bytes_value=b'x00\x01\x02'), + ), ], )