mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-07 16:41:36 +00:00
fix(ci): resolve 9 remaining staticcheck issues
- SA5011: use t.Fatal instead of t.Error before nil pointer access in verification handler tests (stops test execution on nil) - SA4006: replace unused lvalues with _ in repo_test.go and team_test.go - ST1020: fix comment format on ListViolations to match method name Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -212,7 +212,7 @@ func TestCertificateRepository_List_Filtering(t *testing.T) {
|
||||
}
|
||||
|
||||
// Filter by environment
|
||||
certs, total, err = repo.List(ctx, &repository.CertificateFilter{Environment: "production"})
|
||||
_, total, err = repo.List(ctx, &repository.CertificateFilter{Environment: "production"})
|
||||
if err != nil {
|
||||
t.Fatalf("List with env filter failed: %v", err)
|
||||
}
|
||||
@@ -1102,7 +1102,7 @@ func TestDiscoveryRepository_ScanCRUD(t *testing.T) {
|
||||
}
|
||||
|
||||
// ListScans with empty agent (all)
|
||||
scans, total, err = repo.ListScans(ctx, "", 1, 10)
|
||||
_, total, err = repo.ListScans(ctx, "", 1, 10)
|
||||
if err != nil {
|
||||
t.Fatalf("ListScans all failed: %v", err)
|
||||
}
|
||||
@@ -1188,7 +1188,7 @@ func TestDiscoveryRepository_DiscoveredCertCRUD(t *testing.T) {
|
||||
}
|
||||
|
||||
// ListDiscovered
|
||||
certs, total, err := repo.ListDiscovered(ctx, &repository.DiscoveryFilter{Page: 1, PerPage: 10})
|
||||
_, total, err := repo.ListDiscovered(ctx, &repository.DiscoveryFilter{Page: 1, PerPage: 10})
|
||||
if err != nil {
|
||||
t.Fatalf("ListDiscovered failed: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user