Skip to content

Commit

Permalink
add skipped to test agent trace checks
Browse files Browse the repository at this point in the history
  • Loading branch information
wconti27 committed Jun 22, 2023
1 parent a3ca78d commit 428d0eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions ddapm_test_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ async def request_forwarder_middleware(self, request: Request, handler: _Handler
env_vars = {
key.strip(): value.strip() for key, value in (pair.split("=") for pair in var_string.split(","))
}
log.debug("Found the following Datadog Trace Env Variables: " + str(env_vars))
request["_dd_trace_env_variables"] = env_vars

if "X-Datadog-Agent-Proxy-Disabled" in headers:
Expand Down
9 changes: 9 additions & 0 deletions ddapm_test_agent/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,25 @@ class Check:

def __init__(self):
self._failed: bool = False
self._skipped: bool = False
self._msg: str = ""

@property
def failed(self) -> bool:
return self._failed

@property
def skipped(self) -> bool:
return self._skipped

def fail(self, msg: str) -> None:
self._failed = True
self._msg = msg

def skip(self, msg: str) -> None:
self._skipped = True
self._msg = msg

def check(self, *args, **kwargs):
"""Perform any checking required for this Check.
Expand Down

0 comments on commit 428d0eb

Please sign in to comment.