-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FWI-5422 - Log CI scanning non-blocking errors (#853)
* WIP - print scan errors * add scan-errors logs * bump version * fix changelog * fix typo * adding test back
- Loading branch information
1 parent
69da32a
commit e26ec92
Showing
5 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package ci | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/fairwindsops/insights-plugins/plugins/ci/pkg/models" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestAddScanErrorsReportResultFromAMultiError(t *testing.T) { | ||
assert.Equal(t, "context from the first error/deployment/myapp - an error with additional context (deployment.yaml)", | ||
createErrorItemMessage(models.ScanErrorsReportResult{ | ||
ErrorMessage: "an error with additional context", | ||
ErrorContext: "context from the first error", | ||
Kind: "deployment", | ||
ResourceName: "myapp", | ||
Severity: 2.0, | ||
Category: "Security", | ||
Remediation: "fix the deployment", | ||
Filename: "deployment.yaml", | ||
})) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5.3.0 | ||
5.3.1 |