Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove backticks in vulncheck details template. #4562

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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