Skip to content

Commit

Permalink
change test fmt print to t Log
Browse files Browse the repository at this point in the history
  • Loading branch information
lucamrgs committed Mar 7, 2024
1 parent d70123b commit 7ab464d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/unittest/capability/http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package http_test

import (
"errors"
"fmt"
"soarca/internal/capability/http"
"soarca/models/cacao"
"soarca/models/execution"
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}

0 comments on commit 7ab464d

Please sign in to comment.