Skip to content

Commit

Permalink
Use Errorf in test
Browse files Browse the repository at this point in the history
Signed-off-by: AdamKorcz <[email protected]>
  • Loading branch information
AdamKorcz committed Sep 14, 2023
1 parent 419820f commit a98d771
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions checks/evaluation/license_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func TestLicense(t *testing.T) {
},
result: scut.TestReturn{
Score: checker.MaxResultScore,

Check failure on line 49 in checks/evaluation/license_test.go

View workflow job for this annotation

GitHub Actions / check-linter

File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/ossf/scorecard) (gci)
NumberOfInfo: 0,
},
}, {
findings: []finding.Finding{
Expand All @@ -66,7 +65,6 @@ func TestLicense(t *testing.T) {
},
result: scut.TestReturn{
Score: checker.MinResultScore,

Check failure on line 67 in checks/evaluation/license_test.go

View workflow job for this annotation

GitHub Actions / check-linter

File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/ossf/scorecard) (gci)
NumberOfInfo: 0,
},
}, {
findings: []finding.Finding{
Expand All @@ -85,7 +83,6 @@ func TestLicense(t *testing.T) {
},
result: scut.TestReturn{
Score: 6,

Check failure on line 85 in checks/evaluation/license_test.go

View workflow job for this annotation

GitHub Actions / check-linter

File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/ossf/scorecard) (gci)
NumberOfInfo: 0,
},
}, {
findings: []finding.Finding{
Expand All @@ -100,7 +97,6 @@ func TestLicense(t *testing.T) {
},
result: scut.TestReturn{
Score: -1,

Check failure on line 99 in checks/evaluation/license_test.go

View workflow job for this annotation

GitHub Actions / check-linter

File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/ossf/scorecard) (gci)
NumberOfInfo: 0,
Error: sce.ErrScorecardInternal,
},
}, {
Expand All @@ -120,7 +116,6 @@ func TestLicense(t *testing.T) {
},
result: scut.TestReturn{
Score: 9,

Check failure on line 118 in checks/evaluation/license_test.go

View workflow job for this annotation

GitHub Actions / check-linter

File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/ossf/scorecard) (gci)
NumberOfInfo: 0,
},
}, {
findings: []finding.Finding{
Expand All @@ -139,7 +134,6 @@ func TestLicense(t *testing.T) {
},
result: scut.TestReturn{
Score: 7,

Check failure on line 136 in checks/evaluation/license_test.go

View workflow job for this annotation

GitHub Actions / check-linter

File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/ossf/scorecard) (gci)
NumberOfInfo: 0,
},
},
}
Expand All @@ -150,7 +144,7 @@ func TestLicense(t *testing.T) {
dl := scut.TestDetailLogger{}
got := License(tt.name, tt.findings, &dl)
if !scut.ValidateTestReturn(t, tt.name, &tt.result, &got, &dl) {
t.Fatalf(tt.name)
t.Errorf("got %v, expected %v", got, tt.result)
}
})
}
Expand Down

0 comments on commit a98d771

Please sign in to comment.