Advisor: Replace Error naming with Failure (#100262)

This commit is contained in:
Andres Martinez Gotor
2025-02-07 15:48:18 +01:00
committed by GitHub
parent 0beb7e668b
commit f607bcd43f
12 changed files with 101 additions and 101 deletions
+3 -3
View File
@@ -105,7 +105,7 @@ func TestProcessMultipleCheckItems(t *testing.T) {
assert.Equal(t, "processed", obj.GetAnnotations()[statusAnnotation])
r := client.lastValue.(advisorv0alpha1.CheckV0alpha1StatusReport)
assert.Equal(t, r.Count, int64(100))
assert.Len(t, r.Errors, 50)
assert.Len(t, r.Failures, 50)
}
func TestProcessCheck_AlreadyProcessed(t *testing.T) {
@@ -173,12 +173,12 @@ type mockStep struct {
err error
}
func (m *mockStep) Run(ctx context.Context, obj *advisorv0alpha1.CheckSpec, items any) (*advisorv0alpha1.CheckReportError, error) {
func (m *mockStep) Run(ctx context.Context, obj *advisorv0alpha1.CheckSpec, items any) (*advisorv0alpha1.CheckReportFailure, error) {
if m.err != nil {
return nil, m.err
}
if _, ok := items.(error); ok {
return &advisorv0alpha1.CheckReportError{}, nil
return &advisorv0alpha1.CheckReportFailure{}, nil
}
return nil, nil
}