Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
p committed Nov 26, 2024
1 parent 307db17 commit 6eb39db
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
4 changes: 2 additions & 2 deletions tests/debugger/test_debugger_pii.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def filter(keys_to_filter):
class Test_Debugger_PII_Redaction(base._Base_Debugger_Test):
def _setup(self, probes_file):
self.initialize_weblog_remote_config()

probes = base.read_probes(probes_file)
self.expected_probe_ids = base.extract_probe_ids(probes)
self.rc_state = rc.send_debugger_command(probes, version=1)
Expand Down Expand Up @@ -187,7 +187,7 @@ def test_pii_redaction_dotnet_2_50(self):
def setup_pii_redaction_line(self):
self._setup("pii_line")

@irrelevant(library = "ruby", reason="Ruby needs to use line probes to capture variables")
@irrelevant(library="ruby", reason="Ruby needs to use line probes to capture variables")
def test_pii_redaction_line(self):
self._test(REDACTED_KEYS, REDACTED_TYPES, True)

Expand Down
24 changes: 17 additions & 7 deletions tests/debugger/test_debugger_probe_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,25 @@

import tests.debugger.utils as base

from utils import scenarios, interfaces, weblog, features, remote_config as rc, bug, missing_feature, context, irrelevant
from utils import (
scenarios,
interfaces,
weblog,
features,
remote_config as rc,
bug,
missing_feature,
context,
irrelevant,
)


@features.debugger
@scenarios.debugger_method_probes_snapshot
class Test_Debugger_Method_Probe_Snaphots(base._Base_Debugger_Test):
def setup_log_method_probe_snaphots(self):
self.initialize_weblog_remote_config()

probes = base.read_probes("probe_snapshot_log_method")
self.expected_probe_ids = base.extract_probe_ids(probes)
self.rc_state = rc.send_debugger_command(probes, version=1)
Expand Down Expand Up @@ -43,7 +53,7 @@ def setup_span_method_probe_snaphots(self):
]

@bug(library="python", reason="DEBUG-2708, DEBUG-2709")
@irrelevant(library = "ruby", reason="Not yet implemented")
@irrelevant(library="ruby", reason="Not yet implemented")
def test_span_method_probe_snaphots(self):
self.assert_all_states_not_error()
self.assert_all_probes_are_installed()
Expand All @@ -64,7 +74,7 @@ def setup_span_decoration_method_probe_snaphots(self):
]

@bug(library="python", reason="DEBUG-2708, DEBUG-2709")
@irrelevant(library = "ruby", reason="Not yet implemented")
@irrelevant(library="ruby", reason="Not yet implemented")
def test_span_decoration_method_probe_snaphots(self):
self.assert_all_states_not_error()
self.assert_all_probes_are_installed()
Expand All @@ -80,7 +90,7 @@ def test_span_decoration_method_probe_snaphots(self):
class Test_Debugger_Line_Probe_Snaphots(base._Base_Debugger_Test):
def setup_log_line_probe_snaphots(self):
self.initialize_weblog_remote_config()

probes = base.read_probes("probe_snapshot_log_line")
self.expected_probe_ids = base.extract_probe_ids(probes)
self.rc_state = rc.send_debugger_command(probes, version=1)
Expand Down Expand Up @@ -111,7 +121,7 @@ def setup_span_decoration_line_probe_snaphots(self):
weblog.get("/debugger/span-decoration/asd/1"),
]

@irrelevant(library = "ruby", reason="Not yet implemented")
@irrelevant(library="ruby", reason="Not yet implemented")
def test_span_decoration_line_probe_snaphots(self):
self.assert_all_states_not_error()
self.assert_all_probes_are_installed()
Expand All @@ -127,7 +137,7 @@ def test_span_decoration_line_probe_snaphots(self):
class Test_Debugger_Mix_Log_Probe(base._Base_Debugger_Test):
def setup_mix_probe(self):
self.initialize_weblog_remote_config()

probes = base.read_probes("probe_snapshot_log_mixed")
self.expected_probe_ids = base.extract_probe_ids(probes)
self.rc_state = rc.send_debugger_command(probes, version=1)
Expand Down
2 changes: 1 addition & 1 deletion tests/debugger/test_debugger_probe_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Test_Debugger_Probe_Statuses(base._Base_Debugger_Test):

def _setup(self, probes):
self.initialize_weblog_remote_config()

Test_Debugger_Probe_Statuses.version += 1
self.rc_state = rc.send_debugger_command(probes=probes, version=Test_Debugger_Probe_Statuses.version)

Expand Down
4 changes: 2 additions & 2 deletions tests/debugger/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ class _Base_Debugger_Test:
rc_state = None
installed_ids = set()
all_probes_installed = False

def initialize_weblog_remote_config(self):
if get_tracer()['language'] == 'ruby':
if get_tracer()["language"] == "ruby":
# Ruby tracer initializes remote configuration client from
# middleware that is only invoked during request processing.
# Therefore, we need to issue a request to the application for
Expand Down

0 comments on commit 6eb39db

Please sign in to comment.