Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerHelmuth committed Jul 30, 2024
1 parent e0c4f98 commit fb98b95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 7 additions & 0 deletions component/componentstatus/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,10 @@ func NewFatalErrorEvent(err error) *Event {
return ev
}

// StatusIsError returns true for error statuses (e.g. StatusRecoverableError,
// StatusPermanentError, or StatusFatalError)
func StatusIsError(status Status) bool {
return status == StatusRecoverableError ||
status == StatusPermanentError ||
status == StatusFatalError
}
3 changes: 0 additions & 3 deletions component/componentstatus/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package componentstatus
import (
"fmt"
"testing"
"time"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -49,7 +48,6 @@ func TestStatusEventsWithError(t *testing.T) {
}
}


func TestStatusIsError(t *testing.T) {
for _, tc := range []struct {
status Status
Expand Down Expand Up @@ -90,4 +88,3 @@ func TestStatusIsError(t *testing.T) {
})
}
}

0 comments on commit fb98b95

Please sign in to comment.