Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 6a49e0f

Browse files
authored
Merge branch 'main' into bug_fix2
2 parents 1e78e9d + d237563 commit 6a49e0f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/ApiService/ApiService/OneFuzzTypes/Model.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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],

src/ApiService/Tests/ReportTests.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)