Skip to content

Commit

Permalink
make debian a const
Browse files Browse the repository at this point in the history
  • Loading branch information
alevenberg committed Nov 15, 2023
1 parent 2fd44f2 commit 8196fa1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/image/remote/remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import (
"github.com/google/go-containerregistry/pkg/v1/types"
)

const image string = "debian"

// mockImage mocks the v1.Image interface
type mockImage struct {
}
Expand Down Expand Up @@ -80,7 +82,6 @@ func (m *mockImage) Size() (int64, error) {
}

func Test_normalizeReference(t *testing.T) {
image := "debian"
expected := "index.docker.io/library/debian:latest"

ref, err := name.ParseReference(image)
Expand Down Expand Up @@ -113,7 +114,6 @@ func Test_RetrieveRemoteImage_manifestCache(t *testing.T) {
}

func Test_RetrieveRemoteImage_skipFallback(t *testing.T) {
image := "debian"
registryMirror := "some-registry"

opts := config.RegistryOptions{
Expand Down Expand Up @@ -143,8 +143,6 @@ func Test_RetrieveRemoteImage_skipFallback(t *testing.T) {
}

func Test_RetryRetrieveRemoteImageSucceeds(t *testing.T) {
image := "debian"

opts := config.RegistryOptions{
ImageDownloadRetry: 2,
}
Expand All @@ -166,8 +164,6 @@ func Test_RetryRetrieveRemoteImageSucceeds(t *testing.T) {
}

func Test_NoRetryRetrieveRemoteImageFails(t *testing.T) {
image := "debian"

opts := config.RegistryOptions{
ImageDownloadRetry: 0,
}
Expand Down

0 comments on commit 8196fa1

Please sign in to comment.