Skip to content

Commit

Permalink
rename fake error object
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekgogia committed Nov 24, 2020
1 parent 099f647 commit 32bfbaa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions pkg/cloudprovider/fake/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ limitations under the License.

package fake

// fakeError implements controllers.RetryableError & controllers.CodedError
type fakeRetryableError struct {
// retryableErr implements controllers.RetryableError & controllers.CodedError
type retryableErr struct {
error
retryable bool
}

func (e *fakeRetryableError) IsRetryable() bool {
func (e *retryableErr) IsRetryable() bool {
return e.retryable
}
func (e *fakeRetryableError) ErrorCode() string {
func (e *retryableErr) ErrorCode() string {
return e.Error()
}

func RetryableError(err error) *fakeRetryableError {
return &fakeRetryableError{error: err, retryable: true}
func RetryableError(err error) *retryableErr {
return &retryableErr{error: err, retryable: true}
}
2 changes: 1 addition & 1 deletion pkg/cloudprovider/fake/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var (

type Factory struct {
WantErr error
// NodeReplicas is use by tests to control observed replicas.
// NodeReplicas is used by tests to control observed replicas.
NodeReplicas map[string]*int32
NodeGroupStable bool
NodeGroupMessage string
Expand Down

0 comments on commit 32bfbaa

Please sign in to comment.