diff --git a/internal/sharedcomponent/sharedcomponent_test.go b/internal/sharedcomponent/sharedcomponent_test.go index c0a123b76a7..5ce081fa752 100644 --- a/internal/sharedcomponent/sharedcomponent_test.go +++ b/internal/sharedcomponent/sharedcomponent_test.go @@ -161,7 +161,6 @@ func TestSharedComponentsReportStatus(t *testing.T) { // simulate an error err = comp.telemetry.ReportComponentStatus(component.NewStatusEvent(component.StatusNone)) - require.Error(t, err) require.ErrorIs(t, err, assert.AnError) // stopping diff --git a/service/internal/status/status_test.go b/service/internal/status/status_test.go index 87a1d3231d9..c439cea39af 100644 --- a/service/internal/status/status_test.go +++ b/service/internal/status/status_test.go @@ -163,13 +163,11 @@ func TestValidSeqsToStopped(t *testing.T) { require.NoError(t, fsm.transition(ev)) // skipping to stopped is not allowed err := fsm.transition(component.NewStatusEvent(component.StatusStopped)) - require.Error(t, err) require.ErrorIs(t, err, errInvalidStateTransition) // stopping -> stopped is allowed for non-fatal, non-permanent errors err = fsm.transition(component.NewStatusEvent(component.StatusStopping)) if ev.Status() == component.StatusPermanentError || ev.Status() == component.StatusFatalError { - require.Error(t, err) require.ErrorIs(t, err, errInvalidStateTransition) } else { require.NoError(t, err) @@ -261,7 +259,6 @@ func TestStatusFuncReady(t *testing.T) { id := &component.InstanceID{} err := serviceStatusFn(id, component.NewStatusEvent(component.StatusStarting)) - require.Error(t, err) require.ErrorIs(t, err, errStatusNotReady) init() diff --git a/service/service_test.go b/service/service_test.go index f8c1d0e4988..8b47218dc6b 100644 --- a/service/service_test.go +++ b/service/service_test.go @@ -433,7 +433,6 @@ func TestServiceFatalError(t *testing.T) { err = <-srv.host.asyncErrorChannel - require.Error(t, err) require.ErrorIs(t, err, assert.AnError) }