Skip to content

Commit

Permalink
Fix issues with imgpkg tests
Browse files Browse the repository at this point in the history
Signed-off-by: Joao Pereira <joaod@vmware.com>
  • Loading branch information
joaopapereira committed Jun 16, 2023
1 parent bee70bb commit dfebd8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/imgpkg/cmd/copy_repo_src_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ func TestToTarBundleContainingNonDistributableLayers(t *testing.T) {
assets := &helpers.Assets{T: t}
bundleBuilder := helpers.NewBundleDir(t, assets)
defer assets.CleanCreatedFolders()

fakeRegistry := helpers.NewFakeRegistry(t, &helpers.Logger{LogLevel: helpers.LogDebug})
imageLockYAML := fmt.Sprintf(`---
apiVersion: imgpkg.carvel.dev/v1alpha1
kind: ImagesLock
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/image_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (i *ImageFactory) PushImageWithANonDistributableLayer(imgRef string, mediaT
})
require.NoError(i.T, err)

err = remote.WriteLayer(imageRef.Context(), layer, remote.WithAuthFromKeychain(authn.DefaultKeychain))
err = remote.WriteLayer(imageRef.Context(), layer, remote.WithAuthFromKeychain(authn.DefaultKeychain), remote.WithNondistributable)
require.NoError(i.T, err)
err = remote.Write(imageRef, image, remote.WithAuthFromKeychain(authn.DefaultKeychain))
require.NoError(i.T, err)
Expand Down

0 comments on commit dfebd8f

Please sign in to comment.