Skip to content

Commit

Permalink
Change validation for client test
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoffl01 committed Jan 9, 2025
1 parent b710ab1 commit a7d59fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_config_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ def setup_query_string_obfuscation_configured_client(self):
@missing_feature(context.library == "nodejs", reason="Node only obfuscates queries on the server side")
@missing_feature(context.library == "golang", reason="Go only obfuscates queries on the server side")
def test_query_string_obfuscation_configured_client(self):
interfaces.library.add_span_tag_validation(
self.r, tags={"http.url": r"^.*/\?<redacted>$"}, value_as_regular_expression=True
)
spans = [s for _, _, s in interfaces.library.get_spans(request=self.r, full_trace=True)]
client_span = _get_span_by_tags(spans, tags={"span.kind": "client", "http.url": "http://weblog:7777/?<redacted>"})
assert client_span, "\n".join([str(s) for s in spans])

def setup_query_string_obfuscation_configured_server(self):
self.r = weblog.get("/?ssn=123-45-6789")
Expand All @@ -131,9 +131,9 @@ def setup_query_string_obfuscation_configured_client(self):
@missing_feature(context.library == "nodejs", reason="Node only obfuscates queries on the server side")
@missing_feature(context.library == "golang", reason="Go only obfuscates queries on the server side")
def test_query_string_obfuscation_configured_client(self):
interfaces.library.add_span_tag_validation(
self.r, tags={"http.url": r"^.*/\?<redacted>$"}, value_as_regular_expression=True
)
spans = [s for _, _, s in interfaces.library.get_spans(request=self.r, full_trace=True)]
client_span = _get_span_by_tags(spans, tags={"span.kind": "client", "http.url": "http://weblog:7777/?<redacted>"})
assert client_span, "\n".join([str(s) for s in spans])

def setup_query_string_obfuscation_configured_server(self):
self.r = weblog.get("/?token=value")
Expand Down

0 comments on commit a7d59fa

Please sign in to comment.