Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
alevenberg committed Nov 15, 2023
1 parent da533e6 commit 2fd44f2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/image/remote/remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

// mockImage mocks the v1.Image interface
type mockImage struct{
type mockImage struct {
}

func (m *mockImage) ConfigFile() (*v1.ConfigFile, error) {
Expand Down Expand Up @@ -150,8 +150,8 @@ func Test_RetryRetrieveRemoteImageSucceeds(t *testing.T) {
}
attempts := 0
remoteImageFunc = func(ref name.Reference, options ...remote.Option) (v1.Image, error) {
if attempts < 2{
attempts ++
if attempts < 2 {
attempts++
return nil, errors.New("no image found")
}
return &mockImage{}, nil
Expand All @@ -173,8 +173,8 @@ func Test_NoRetryRetrieveRemoteImageFails(t *testing.T) {
}
attempts := 0
remoteImageFunc = func(ref name.Reference, options ...remote.Option) (v1.Image, error) {
if attempts < 1 {
attempts ++
if attempts < 1 {
attempts++
return nil, errors.New("no image found")
}
return &mockImage{}, nil
Expand All @@ -186,4 +186,4 @@ func Test_NoRetryRetrieveRemoteImageFails(t *testing.T) {
if _, err := RetrieveRemoteImage(image, opts, ""); err == nil {
t.Fatal("Expected call to fail because there is no retry")
}
}
}

0 comments on commit 2fd44f2

Please sign in to comment.