Skip to content

Commit

Permalink
fix: scorecard: output the failed CR from basic test
Browse files Browse the repository at this point in the history
Signed-off-by: jesus m. rodriguez <jesusr@redhat.com>
  • Loading branch information
jmrodri committed Sep 29, 2021
1 parent 7bd29b4 commit cb0c354
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/scorecard/tests/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package tests

import (
"fmt"

scapiv1alpha3 "github.com/operator-framework/api/pkg/apis/scorecard/v1alpha3"
apimanifests "github.com/operator-framework/api/pkg/manifests"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down Expand Up @@ -50,6 +52,7 @@ func checkSpec(crSet []unstructured.Unstructured,
if cr.Object["spec"] == nil {
res.Errors = append(res.Errors, "error spec does not exist")
res.State = scapiv1alpha3.FailState
res.Suggestions = append(res.Suggestions, fmt.Sprintf("spec missing from [%+v]", cr.GetName()))
return res
}
}
Expand Down

0 comments on commit cb0c354

Please sign in to comment.