Skip to content

Commit

Permalink
fix windows failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
omerzi committed Jun 19, 2023
1 parent 534dd7d commit dc41fe3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions xray/utils/resultwriter_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package utils

import (
"fmt"
"github.com/jfrog/jfrog-cli-core/v2/utils/coreutils"
"github.com/jfrog/jfrog-cli-core/v2/xray/formats"
"github.com/jfrog/jfrog-client-go/xray/services"
"github.com/stretchr/testify/assert"
"path"
"testing"
)

Expand Down Expand Up @@ -115,7 +117,7 @@ func TestGetIacOrSecretsProperties(t *testing.T) {
name: "Infrastructure as Code vulnerability without markdown output",
secretOrIac: formats.IacSecretsRow{
Severity: "high",
File: "/path/to/file",
File: path.Join("path", "to", "file"),
LineColumn: "10:5",
Text: "Vulnerable code",
Type: "Terraform",
Expand All @@ -130,7 +132,7 @@ func TestGetIacOrSecretsProperties(t *testing.T) {
Description: "Vulnerable code",
MarkdownDescription: "",
XrayID: "",
File: "path/to/file",
File: path.Join("path", "to", "file"),
LineColumn: "10:5",
SecretsOrIacType: "Terraform",
},
Expand All @@ -139,7 +141,7 @@ func TestGetIacOrSecretsProperties(t *testing.T) {
name: "Potential secret exposed with markdown output",
secretOrIac: formats.IacSecretsRow{
Severity: "medium",
File: "/path/to/file",
File: path.Join("path", "to", "file"),
LineColumn: "5:3",
Text: "Potential secret",
Type: "AWS Secret Manager",
Expand All @@ -152,9 +154,9 @@ func TestGetIacOrSecretsProperties(t *testing.T) {
Headline: "Potential Secret Exposed",
Severity: "6.9",
Description: "Potential secret",
MarkdownDescription: "| Severity | File | Line:Column | Secret | Type |\n| :---: | :---: | :---: | :---: | :---: |\n| medium | path/to/file | 5:3 | Potential secret | AWS Secret Manager |",
MarkdownDescription: fmt.Sprintf("| Severity | File | Line:Column | Secret | Type |\n| :---: | :---: | :---: | :---: | :---: |\n| medium | %s | 5:3 | Potential secret | AWS Secret Manager |", path.Join("path", "to", "file")),
XrayID: "",
File: "path/to/file",
File: path.Join("path", "to", "file"),
LineColumn: "5:3",
SecretsOrIacType: "AWS Secret Manager",
},
Expand Down

0 comments on commit dc41fe3

Please sign in to comment.