mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-23 07:29:00 -08:00
BREAKING: migrate to a new JSON schema (#782)
* feat: introduce a new JSON schema * test: update * chore(mod): update fanal * refactor: add a comment * test(report): fix * refactor(writer): add omitempty * refactor: replace url * test(scanner): fix
This commit is contained in:
@@ -62,14 +62,16 @@ func TestReportWriter_JSON(t *testing.T) {
|
||||
jsonWritten := bytes.Buffer{}
|
||||
jw.Output = &jsonWritten
|
||||
|
||||
inputResults := report.Results{
|
||||
{
|
||||
Target: "foojson",
|
||||
Vulnerabilities: tc.detectedVulns,
|
||||
inputResults := report.Report{
|
||||
Results: report.Results{
|
||||
{
|
||||
Target: "foojson",
|
||||
Vulnerabilities: tc.detectedVulns,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
err := report.WriteResults("json", &jsonWritten, nil, inputResults, "", false)
|
||||
err := report.Write("json", &jsonWritten, nil, inputResults, "", false)
|
||||
assert.NoError(t, err)
|
||||
|
||||
writtenResults := report.Results{}
|
||||
|
||||
Reference in New Issue
Block a user