Skip to content

Commit 2869bd0

Browse files
committed
add log error to test where expected
1 parent 733df3e commit 2869bd0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scans_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ package main
33
import (
44
"encoding/json"
55
"fmt"
6-
"github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/ocicontainer"
7-
"github.com/jfrog/jfrog-cli-artifactory/utils/tests"
86
"net/http"
97
"net/http/httptest"
108
"path"
@@ -13,6 +11,9 @@ import (
1311
"sync"
1412
"testing"
1513

14+
"github.com/jfrog/jfrog-cli-artifactory/artifactory/commands/ocicontainer"
15+
"github.com/jfrog/jfrog-cli-artifactory/utils/tests"
16+
1617
"github.com/stretchr/testify/assert"
1718
"github.com/stretchr/testify/require"
1819

@@ -36,6 +37,7 @@ import (
3637
coreTests "github.com/jfrog/jfrog-cli-core/v2/utils/tests"
3738

3839
"github.com/jfrog/jfrog-cli-security/utils/xray/scangraph"
40+
"github.com/jfrog/jfrog-client-go/utils/log"
3941
clientTestUtils "github.com/jfrog/jfrog-client-go/utils/tests"
4042
xrayUtils "github.com/jfrog/jfrog-client-go/xray/services/utils"
4143
)
@@ -78,6 +80,7 @@ func getBinaryScanCmdArgs(params binaryScanParams) (args []string) {
7880
func testXrayBinaryScan(t *testing.T, params binaryScanParams, errorExpected bool) string {
7981
output, err := runXrayBinaryScan(t, params)
8082
if errorExpected {
83+
log.Error("Xray binary scan failed: " + err.Error())
8184
assert.Error(t, err)
8285
} else {
8386
assert.NoError(t, err)

0 commit comments

Comments
 (0)