Skip to content

Commit d32ef07

Browse files
committed
tests: internal: opentelemetry: add test case for issue #10672
Signed-off-by: Eduardo Silva <[email protected]>
1 parent a327812 commit d32ef07

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tests/internal/data/opentelemetry/test_cases.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,5 +1225,31 @@
12251225
"log_metadata": {"otlp":{}},
12261226
"log_body": {"test_key": "", "normal_key": "normal_value"}
12271227
}
1228+
},
1229+
"issue_10672_empty_map_as_null": {
1230+
"input": {
1231+
"resourceLogs": [{
1232+
"scopeLogs": [{
1233+
"logRecords": [{
1234+
"timeUnixNano": "1722904465173450100",
1235+
"body": {
1236+
"kvlistValue": {
1237+
"values": [
1238+
{"key": "empty_map_key", "value": {}},
1239+
{"key": "normal_key", "value": {"stringValue": "normal_value"}},
1240+
{"key": "missing_value_key"}
1241+
]
1242+
}
1243+
}
1244+
}]
1245+
}]
1246+
}]
1247+
},
1248+
"expected": {
1249+
"group_metadata": {"schema":"otlp","resource_id":0,"scope_id":0},
1250+
"group_body": {"resource":{}},
1251+
"log_metadata": {"otlp":{}},
1252+
"log_body": {"empty_map_key": null, "normal_key": "normal_value", "missing_value_key": ""}
1253+
}
12281254
}
12291255
}

0 commit comments

Comments
 (0)