Skip to content

Commit

Permalink
merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Nov 24, 2024
1 parent 874db13 commit ce7936c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion xray/services/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (ss *ScanService) GetScanGraphResults(scanId, xrayVersion string, includeVu
endPoint := ss.XrayDetails.GetUrl() + scanGraphAPI
// Modify endpoint if XSC is enabled
if xscEnabled {
endPoint = utils.XrayUrlToXscUrl(ss.XrayDetails.GetUrl(), xrayVersion) + XscGraphAPI
endPoint = xscUtils.XrayUrlToXscUrl(ss.XrayDetails.GetUrl(), xrayVersion) + XscGraphAPI
}
endPoint += "/" + scanId

Expand Down
11 changes: 6 additions & 5 deletions xray/services/scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@ func TestCreateScanGraphQueryParams(t *testing.T) {
for _, test := range tests {
t.Run(test.testName, func(t *testing.T) {
params := XrayGraphScanParams{
RepoPath: test.repoPath,
Watches: test.watches,
ProjectKey: test.projectKey,
ScanType: test.scanType,
RepoPath: test.repoPath,
Watches: test.watches,
ProjectKey: test.projectKey,
ScanType: test.scanType,
XrayVersion: test.xrayVersion,
XscGitInfoContext: &XscGitInfoContext{
GitRepoUrl: test.gitRepoUrl,
},
}
actualQuery := createScanGraphQueryParams(test.xrayVersion, params)
actualQuery := createScanGraphQueryParams(params)
if actualQuery != test.expectedQuery {
t.Error(test.testName, "Expecting:", test.expectedQuery, "Got:", actualQuery)
}
Expand Down
2 changes: 1 addition & 1 deletion xsc/services/utils/utils_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package utils

import (
"testing"
"github.com/stretchr/testify/assert"
"testing"
)

func TestXrayUrlToXscUrl(t *testing.T) {
Expand Down

0 comments on commit ce7936c

Please sign in to comment.