This repository was archived by the owner on Nov 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -464,6 +464,8 @@ public record Report(
464464 string ? OnefuzzVersion ,
465465 Uri ? ReportUrl
466466) : IReport , ITruncatable < Report > {
467+
468+ [ JsonExtensionData ] public Dictionary < string , JsonElement > ? ExtensionData { get ; set ; }
467469 public Report Truncate ( int maxLength ) {
468470 return this with {
469471 Executable = Executable [ ..maxLength ] ,
Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ void TestParseReport() {
3636 },
3737 "tool_name": "libfuzzer",
3838 "tool_version": "1.2.3",
39- "onefuzz_version": "1.2.3"
39+ "onefuzz_version": "1.2.3",
40+ "extra_property1": "test",
41+ "extra_property2": 5
4042}
4143""" ;
4244
@@ -78,7 +80,11 @@ void TestParseReport() {
7880""" ;
7981
8082 var report = Reports . ParseReportOrRegression ( testReport , new Uri ( "http://test" ) ) ;
81- _ = Assert . IsType < Report > ( report ) ;
83+ var reportInstance = Assert . IsType < Report > ( report ) ;
84+
85+ Assert . Equal ( "test" , reportInstance ? . ExtensionData ? [ "extra_property1" ] . GetString ( ) ) ;
86+ Assert . Equal ( 5 , reportInstance ? . ExtensionData ? [ "extra_property2" ] . GetInt32 ( ) ) ;
87+
8288
8389 var regression = Reports . ParseReportOrRegression ( testRegresion , new Uri ( "http://test" ) ) ;
8490 _ = Assert . IsType < RegressionReport > ( regression ) ;
You can’t perform that action at this time.
0 commit comments