Skip to content

Commit

Permalink
test: update to match new error
Browse files Browse the repository at this point in the history
  • Loading branch information
thisislawatts committed Apr 12, 2024
1 parent 9728321 commit 285917a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cliv2/cmd/cliv2/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func Test_getErrorFromWorkFlowData(t *testing.T) {
data := workflow.NewData(workflowIdentifier, "application/json; type=snyk-test-summary", []byte(`{"results": [{"severity": "critical", "total": 99, "open": 97, "ignored": 2}]}`))
err := getErrorFromWorkFlowData([]workflow.Data{data})
require.NotNil(t, err)
assert.Equal(t, "vulnerabilities found", err.Error())
assert.ErrorIs(t, err, cli_errors.ErrorWithExitCode{ExitCode: constants.SNYK_EXIT_CODE_VULNERABILITIES_FOUND})
})

t.Run("workflow with empty testing findings", func(t *testing.T) {
Expand All @@ -257,6 +257,7 @@ func Test_getErrorFromWorkFlowData(t *testing.T) {
}

func addEmptyWorkflows(t *testing.T, engine workflow.Engine, commandList []string) {
t.Helper()
for _, v := range commandList {
fn := func(invocation workflow.InvocationContext, input []workflow.Data) ([]workflow.Data, error) {
return []workflow.Data{}, nil
Expand Down

0 comments on commit 285917a

Please sign in to comment.