Skip to content

Commit

Permalink
fix: wrong meta_struct verification
Browse files Browse the repository at this point in the history
Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
  • Loading branch information
eliottness committed Aug 16, 2024
1 parent 68f3552 commit e9faac5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ddapm_test_agent/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,8 @@ def verify_span(d: Any) -> Span:
assert isinstance(v, str), f"Expected value of key 'meta.{k}' to be of type: 'str', got: {type(v)}"
if "meta_struct" in d:
assert isinstance(d["meta_struct"], dict)
for k, v in d["meta_struct"].items():
assert isinstance(k, str), f"Expected key 'meta_struct.{k}' to be of type: 'str', got: {type(k)}"
assert isinstance(
v, bytes
), f"Expected msgpack'd value of key 'meta_struct.{k}' to be of type: 'bytes', got: {type(v)}"
for k, val in d["meta_struct"].items():
assert isinstance(k, str), f"Expected key 'meta_struct.{k}' to be of type: 'str', got: {type(k)}"
assert isinstance(
val, dict
), f"Expected msgpack decoded value of key 'meta_struct.{k}' to be of type: 'dict', got: {type(val)}"
Expand Down

0 comments on commit e9faac5

Please sign in to comment.