Skip to content

Commit

Permalink
Remove backticks in vulncheck details template. (#4562)
Browse files Browse the repository at this point in the history
It currently looks weird in the UI, we'll get rid of them for now.
  • Loading branch information
blkt authored Sep 24, 2024
1 parent 9f9c6d3 commit 98a1840
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
11 changes: 0 additions & 11 deletions internal/engine/errors/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import (
"testing"

"github.com/stretchr/testify/require"

"github.com/stacklok/minder/internal/engine/eval/templates"
)

func TestLegacyEvaluationDetailRendering(t *testing.T) {
Expand Down Expand Up @@ -113,15 +111,6 @@ func TestEvaluationDetailRendering(t *testing.T) {
error: "evaluation failure: this is the message",
details: "evaluation failure: this is the message",
},
// vulncheck template
{
name: "vulncheck template",
msg: "this is the message",
tmpl: templates.VulncheckTemplate,
args: map[string]any{"packages": []string{"boto3", "urllib3", "python-oauth2"}},
error: "evaluation failure: this is the message",
details: "Vulnerable packages found:\n* `boto3`\n* `urllib3`\n* `python-oauth2`\n",
},
}

for _, tt := range tests {
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/eval/templates/vulncheckTemplate.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Vulnerable packages found:
{{- range .packages }}
* `{{- . -}}`
* {{ . }}
{{- end }}
2 changes: 1 addition & 1 deletion internal/engine/eval/vulncheck/vulncheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestEvaluationDetailRendering(t *testing.T) {
tmpl: templates.VulncheckTemplate,
args: map[string]any{"packages": []string{"boto3", "urllib3", "python-oauth2"}},
error: "evaluation failure: this is the message",
details: "Vulnerable packages found:\n* `boto3`\n* `urllib3`\n* `python-oauth2`\n",
details: "Vulnerable packages found:\n* boto3\n* urllib3\n* python-oauth2\n",
},
}

Expand Down

0 comments on commit 98a1840

Please sign in to comment.