From f3670ca629c521a92a526458e781cfdbeff4cde4 Mon Sep 17 00:00:00 2001 From: cbrom Date: Fri, 24 Nov 2023 15:05:39 +0300 Subject: [PATCH] coverage test for ScanResultReport AsFNVHash function Signed-off-by: cbrom --- core/pkg/containerscan/containerscan_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/pkg/containerscan/containerscan_test.go b/core/pkg/containerscan/containerscan_test.go index 47cf4ae2..10bffd1d 100644 --- a/core/pkg/containerscan/containerscan_test.go +++ b/core/pkg/containerscan/containerscan_test.go @@ -293,3 +293,12 @@ func TestCalculateFixed(t *testing.T) { }) } } + +func TestReturnsHashValueForValidInputValues(t *testing.T) { + report := ScanResultReport{} + expectedHash := "7416232187745851261" + actualHash := report.AsFNVHash() + if actualHash != expectedHash { + t.Errorf("Expected hash value %s, but got %s", expectedHash, actualHash) + } +}