From 78a1ac1804aa6ea01cedb40ea8cd11101f5e00eb Mon Sep 17 00:00:00 2001 From: elchananarb Date: Wed, 14 Aug 2024 11:29:23 +0300 Subject: [PATCH] Update result_test.go --- internal/commands/result_test.go | 37 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/internal/commands/result_test.go b/internal/commands/result_test.go index 111cdb7c0..bd63d8870 100644 --- a/internal/commands/result_test.go +++ b/internal/commands/result_test.go @@ -237,24 +237,6 @@ func TestRunGetResultsByScanIdJsonFormat(t *testing.T) { // Remove generated json file removeFileBySuffix(t, printer.FormatJSON) } -func createTestScanResultsCollection() *wrappers.ScanResultsCollection { - return &wrappers.ScanResultsCollection{ - Results: []*wrappers.ScanResult{ - { - Description: "Vulnerability in SomeComponent", - DescriptionHTML: "Description with quotes", - ScanResultData: wrappers.ScanResultData{ - Nodes: []*wrappers.ScanResultNode{ - { - FullName: "SomeClass<T>", - Name: "Name with "quotes"", - }, - }, - }, - }, - }, - } -} func TestDecodeHTMLEntitiesInResults(t *testing.T) { // Setup: Creating test data with HTML entities @@ -346,6 +328,25 @@ func TestRunGetResultsByScanIdSummaryMarkdownFormat(t *testing.T) { removeFileBySuffix(t, "md") } +func createTestScanResultsCollection() *wrappers.ScanResultsCollection { + return &wrappers.ScanResultsCollection{ + Results: []*wrappers.ScanResult{ + { + Description: "Vulnerability in SomeComponent", + DescriptionHTML: "Description with quotes", + ScanResultData: wrappers.ScanResultData{ + Nodes: []*wrappers.ScanResultNode{ + { + FullName: "SomeClass<T>", + Name: "Name with "quotes"", + }, + }, + }, + }, + }, + } +} + func removeFileBySuffix(t *testing.T, suffix string) { removeFile(t, fileName, suffix) }