From 67ee6c8a79edaca0a9d036df84466b983700ed79 Mon Sep 17 00:00:00 2001 From: Adam Korczynski Date: Tue, 6 Feb 2024 14:24:16 +0000 Subject: [PATCH] Change usage of ValidateTestReturn Signed-off-by: Adam Korczynski --- checks/evaluation/pinned_dependencies_test.go | 2 +- checks/pinned_dependencies_test.go | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/checks/evaluation/pinned_dependencies_test.go b/checks/evaluation/pinned_dependencies_test.go index b65f07434548..24d712bcc32a 100644 --- a/checks/evaluation/pinned_dependencies_test.go +++ b/checks/evaluation/pinned_dependencies_test.go @@ -413,7 +413,7 @@ func Test_PinningDependencies(t *testing.T) { t.Parallel() dl := scut.TestDetailLogger{} got := PinningDependencies(tt.name, tt.findings, &dl) - scut.ValidateTestReturn(t, tt.name, &tt.expected, &actual, &dl) + scut.ValidateTestReturn(t, tt.name, &tt.result, &got, &dl) }) } } diff --git a/checks/pinned_dependencies_test.go b/checks/pinned_dependencies_test.go index 63fef6367604..ec7acfb175f2 100644 --- a/checks/pinned_dependencies_test.go +++ b/checks/pinned_dependencies_test.go @@ -76,10 +76,7 @@ func TestPinningDependencies(t *testing.T) { } res := PinningDependencies(c) - - if !scut.ValidateTestReturn(t, tt.name, &tt.want, &res, &dl) { - t.Errorf("test failed: log message not present: %+v on %+v", tt.want, res) - } + scut.ValidateTestReturn(t, tt.name, &tt.want, &res, &dl) }) } }