Skip to content

Commit

Permalink
Merge pull request #280 from vmware-tanzu/bump-imgpkg
Browse files Browse the repository at this point in the history
Bump imgpkg to version 0.32.0
  • Loading branch information
joaopapereira authored Sep 16, 2022
2 parents 05071c2 + d5362bd commit e1aa1ac
Show file tree
Hide file tree
Showing 194 changed files with 16,323 additions and 5,865 deletions.
28 changes: 13 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,24 @@ go 1.18
require (
github.com/cppforlife/cobrautil v0.0.0-20200514214827-bb86e6965d72
github.com/cppforlife/go-cli-ui v0.0.0-20220428182907-73db60c7611a
github.com/google/go-containerregistry v0.10.0
github.com/google/go-containerregistry v0.11.0
github.com/hashicorp/go-version v1.6.0
github.com/kisielk/errcheck v1.6.2
github.com/spf13/cobra v1.5.0
github.com/stretchr/testify v1.8.0
github.com/vmware-tanzu/carvel-imgpkg v0.29.0
github.com/vmware-tanzu/carvel-vendir v0.30.0
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29
github.com/vmware-tanzu/carvel-imgpkg v0.32.0
github.com/vmware-tanzu/carvel-vendir v0.31.0
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
k8s.io/apimachinery v0.24.3
sigs.k8s.io/yaml v1.3.0
)

require (
github.com/cppforlife/color v1.9.1-0.20200716202919-6706ac40b835 // indirect
github.com/creack/pty v1.1.11 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/cli v20.10.16+incompatible // indirect
github.com/docker/cli v20.10.17+incompatible // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/docker v20.10.16+incompatible // indirect
github.com/docker/docker v20.10.17+incompatible // indirect
github.com/docker/docker-credential-helpers v0.6.4 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
Expand All @@ -32,28 +31,27 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/k14s/semver/v4 v4.0.1-0.20210701191048-266d47ac6115 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/vito/go-interact v1.0.1 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/net v0.0.0-20220524220425-1d687d428aca // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.10 // indirect
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect
golang.org/x/tools v0.1.11 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/klog/v2 v2.70.1 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
Expand Down
58 changes: 30 additions & 28 deletions go.sum

Large diffs are not rendered by default.

62 changes: 17 additions & 45 deletions test/e2e/resolve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"os"
"strings"
"testing"

"github.com/stretchr/testify/require"
)

func TestResolveSuccessful(t *testing.T) {
Expand Down Expand Up @@ -40,9 +42,7 @@ spec:
- image: index.docker.io/library/nginx@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
`

if out != expectedOut {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", out, expectedOut)
}
require.YAMLEq(t, expectedOut, out)
}

func TestResolveSuccessfulWithAnnotations(t *testing.T) {
Expand Down Expand Up @@ -88,9 +88,7 @@ spec:
- image: index.docker.io/library/nginx@sha256:f7988fb6c02e0ce69257d9bd9cf37ae20a60f1df7563c3a2a6abe24160306b8d
`

if out != expectedOut {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", out, expectedOut)
}
require.YAMLEq(t, expectedOut, out)
}

func TestSortAnnotations(t *testing.T) {
Expand Down Expand Up @@ -145,9 +143,7 @@ spec:
- image: ccc
`

if out != expectedOut {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", out, expectedOut)
}
require.YAMLEq(t, expectedOut, out)
}

func TestResolveInvalidDigest(t *testing.T) {
Expand All @@ -165,11 +161,8 @@ spec:
AllowError: true,
})

expectedErr := "Expected valid digest reference, but found 'nginx@sha256:digest', reason: digest must be between 71 and 71 characters in length: sha256:digest"

if !strings.Contains(err.Error(), expectedErr) {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", err, expectedErr)
}
expectedErr := "Expected valid digest reference, but found 'nginx@sha256:digest', reason: invalid checksum digest length"
require.Contains(t, err.Error(), expectedErr)
}

func TestResolveUnknownImage(t *testing.T) {
Expand All @@ -188,10 +181,7 @@ spec:
})

expectedErr := "- Resolving image 'unknown': GET https://index.docker.io/v2/library/unknown/manifests/latest: UNAUTHORIZED: authentication required;"

if !strings.Contains(err.Error(), expectedErr) {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", err, expectedErr)
}
require.Contains(t, err.Error(), expectedErr)
}

func TestResolveWithOverride(t *testing.T) {
Expand Down Expand Up @@ -225,9 +215,7 @@ spec:
- image: docker.io/library/nginx:1.14.2
`

if out != expectedOut {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", out, expectedOut)
}
require.YAMLEq(t, expectedOut, out)
}

func TestResolveWithImageMap(t *testing.T) {
Expand Down Expand Up @@ -274,9 +262,7 @@ spec:
- image: img3
`

if out != expectedOut {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", out, expectedOut)
}
require.YAMLEq(t, expectedOut, out)
}

func TestResolveWithImageKeys(t *testing.T) {
Expand Down Expand Up @@ -311,9 +297,7 @@ spec:
anotherCustomImage: index.docker.io/library/nginx@sha256:f7988fb6c02e0ce69257d9bd9cf37ae20a60f1df7563c3a2a6abe24160306b8d
`

if out != expectedOut {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", out, expectedOut)
}
require.YAMLEq(t, expectedOut, out)
}

func TestResolveWithOverrideMatchingImageRepo(t *testing.T) {
Expand Down Expand Up @@ -346,9 +330,7 @@ spec:
- image: index.docker.io/library/nginx@sha256:f7988fb6c02e0ce69257d9bd9cf37ae20a60f1df7563c3a2a6abe24160306b8d
`

if out != expectedOut {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", out, expectedOut)
}
require.YAMLEq(t, expectedOut, out)
}

func TestResolveSuccessfulWithSearchRules(t *testing.T) {
Expand Down Expand Up @@ -421,9 +403,7 @@ spec:
- image: skip
`

if out != expectedOut {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", out, expectedOut)
}
require.YAMLEq(t, expectedOut, out)
}

func TestResolveSuccessfulWithDuplicateSearchRules(t *testing.T) {
Expand Down Expand Up @@ -454,9 +434,7 @@ spec:
- sidecarImage: index.docker.io/library/nginx@sha256:f7988fb6c02e0ce69257d9bd9cf37ae20a60f1df7563c3a2a6abe24160306b8d
`

if out != expectedOut {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", out, expectedOut)
}
require.YAMLEq(t, expectedOut, out)
}

func TestResolveSuccessfulWithTagSelection(t *testing.T) {
Expand Down Expand Up @@ -508,9 +486,7 @@ spec:
- image: index.docker.io/library/nginx@sha256:32fdf92b4e986e109e4db0865758020cb0c3b70d6ba80d02fe87bad5cc3dc228
`

if out != expectedOut {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", out, expectedOut)
}
require.YAMLEq(t, expectedOut, out)
}

func TestResolveSuccessfulWithPlatformSelectionConfig(t *testing.T) {
Expand Down Expand Up @@ -579,9 +555,7 @@ spec:
- image: index.docker.io/library/nginx@sha256:f7988fb6c02e0ce69257d9bd9cf37ae20a60f1df7563c3a2a6abe24160306b8d
`

if out != expectedOut {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", out, expectedOut)
}
require.YAMLEq(t, expectedOut, out)
}

func TestResolveSuccessfulWithPlatformSelectionWithGlobalFlag(t *testing.T) {
Expand Down Expand Up @@ -646,7 +620,5 @@ spec:
- image: index.docker.io/library/nginx@sha256:706446e9c6667c0880d5da3f39c09a6c7d2114f5a5d6b74a2fafd24ae30d2078
`

if out != expectedOut {
t.Fatalf("Expected >>>%s<<< to match >>>%s<<<", out, expectedOut)
}
require.YAMLEq(t, expectedOut, out)
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 12 additions & 15 deletions vendor/github.com/google/go-containerregistry/pkg/name/digest.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e1aa1ac

Please sign in to comment.