From 7ab464dadb026c3a82bf81e54f648dd3eda71c09 Mon Sep 17 00:00:00 2001 From: "luca.morgese@tno.nl" Date: Thu, 7 Mar 2024 17:01:31 +0100 Subject: [PATCH] change test fmt print to t Log --- test/unittest/capability/http/http_test.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/unittest/capability/http/http_test.go b/test/unittest/capability/http/http_test.go index fc1b9c40..2b8cc22e 100644 --- a/test/unittest/capability/http/http_test.go +++ b/test/unittest/capability/http/http_test.go @@ -5,7 +5,6 @@ package http_test import ( "errors" - "fmt" "soarca/internal/capability/http" "soarca/models/cacao" "soarca/models/execution" @@ -62,11 +61,11 @@ func TestHTTPOptionsCorrectlyGenerated(t *testing.T) { target, cacao.VariableMap{"test": variable1}) if err != nil { - fmt.Println(err) + t.Log(err) t.Fail() } assert.Equal(t, results["__soarca_http_result__"].Value, payload) - fmt.Println(results) + t.Log(results) mock_http_request.AssertExpectations(t) } @@ -111,11 +110,11 @@ func TestHTTPOptionsEmptyAuth(t *testing.T) { target, cacao.VariableMap{"test": variable1}) if err != nil { - fmt.Println(err) + t.Log(err) t.Fail() } assert.Equal(t, results["__soarca_http_result__"].Value, payload) - fmt.Println(results) + t.Log(results) mock_http_request.AssertExpectations(t) } @@ -160,11 +159,11 @@ func TestHTTPOptionsEmptyCommand(t *testing.T) { target, cacao.VariableMap{"test": variable1}) if err == nil { - fmt.Println(err) + t.Log(err) t.Fail() } assert.Equal(t, err, expected_error) - fmt.Println(results) + t.Log(results) mock_http_request.AssertExpectations(t) }