Skip to content

Commit

Permalink
fix input for configured case
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoffl01 committed Jan 9, 2025
1 parent 03d1f5f commit b710ab1
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions tests/test_config_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ class Test_Config_ObfuscationQueryStringRegexp_Empty:
def setup_query_string_obfuscation_empty_client(self):
self.r = weblog.get("/make_distant_call", params={"url": "http://weblog:7777/?key=monkey"})

@irrelevant(context.library="dotnet", reason="TODO (jira card) dotnet does not obfsucate http client spans")
@bug(context.library == "java", reason="APMAPI-770")
@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")
Expand All @@ -106,9 +105,8 @@ def test_query_string_obfuscation_empty_server(self):
@features.tracing_configuration_consistency
class Test_Config_ObfuscationQueryStringRegexp_Configured:
def setup_query_string_obfuscation_configured_client(self):
self.r = weblog.get("/make_distant_call", params={"url": "http://weblog:7777/?key=monkey"})
self.r = weblog.get("/make_distant_call", params={"url": "http://weblog:7777/?ssn=123-45-6789"})

@bug(context.library == "dotnet", reason="TODO (jira card) dotnet does not obfsucate http client spans")
@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):
Expand All @@ -124,6 +122,26 @@ def test_query_string_obfuscation_configured_server(self):
self.r, tags={"http.url": r"^.*/\?<redacted>$"}, value_as_regular_expression=True
)

@scenarios.default
@features.tracing_configuration_consistency
class Test_Config_ObfuscationQueryStringRegexp_Default:
def setup_query_string_obfuscation_configured_client(self):
self.r = weblog.get("/make_distant_call", params={"url": "http://weblog:7777/?token=value"})

@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
)

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

def test_query_string_obfuscation_configured_server(self):
interfaces.library.add_span_tag_validation(
self.r, tags={"http.url": r"^.*/\?<redacted>$"}, value_as_regular_expression=True
)

@scenarios.default
@features.tracing_configuration_consistency
Expand Down

0 comments on commit b710ab1

Please sign in to comment.