@@ -39,7 +39,6 @@ def setUp(self):
3939 ]
4040
4141 self .invalid_otlp_tracing_endpoints = [
42- "https://xray.bad-region-1.amazonaws.com/v1/traces" ,
4342 "https://xray.us-east-1.amaz.com/v1/traces" ,
4443 "https://logs.us-east-1.amazonaws.com/v1/logs" ,
4544 "https://test-endpoint123.com/test" ,
@@ -89,8 +88,7 @@ def test_sigv4_exporter_init_valid_cw_otlp_endpoint(self, session_mock):
8988 self .assertEqual (exporter ._aws_region , "us-east-1" )
9089 self .validate_exporter_extends_http_span_exporter (exporter , OTLP_XRAY_ENDPOINT )
9190
92- @patch ("botocore.session.Session" )
93- def test_sigv4_exporter_init_invalid_cw_otlp_endpoint (self , botocore_mock ):
91+ def test_sigv4_exporter_init_invalid_cw_otlp_endpoint (self ):
9492 """Tests that the exporter constructor behavior is set by OTLP protobuf/http Span Exporter
9593 if an invalid OTLP CloudWatch endpoint is set"""
9694 for bad_endpoint in self .invalid_otlp_tracing_endpoints :
@@ -125,7 +123,8 @@ def test_sigv4_exporter_export_does_not_add_sigv4_if_not_valid_cw_endpoint(self,
125123 exporter = OTLPAwsSpanExporter (endpoint = OTLP_XRAY_ENDPOINT )
126124 exporter .export (self .testing_spans )
127125
128- # For each invalid CW OTLP endpoint, vdalidate that SigV4 is not injected
126+ # For each invalid CW OTLP endpoint, validate that SigV4 is not injected
127+ self .invalid_otlp_tracing_endpoints .append ("https://xray.bad-region-1.amazonaws.com/v1/traces" )
129128 for bad_endpoint in self .invalid_otlp_tracing_endpoints :
130129 with self .subTest (endpoint = bad_endpoint ):
131130 with patch .dict (os .environ , {OTEL_EXPORTER_OTLP_TRACES_ENDPOINT : bad_endpoint }):
0 commit comments