Skip to content

Commit

Permalink
Merge pull request #298 from vmware-tanzu/bump-ggcr-0-7-0
Browse files Browse the repository at this point in the history
Bump ggcr 0.7.0
  • Loading branch information
joaopapereira authored Nov 16, 2021
2 parents 976b631 + 5c5c63b commit 2b5ab85
Show file tree
Hide file tree
Showing 259 changed files with 18,760 additions and 12,038 deletions.
26 changes: 13 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/cppforlife/go-cli-ui v0.0.0-20200506005011-4268990983cc
github.com/fatih/color v1.10.0 // indirect
github.com/go-logr/logr v1.2.0
github.com/google/go-containerregistry v0.6.0
github.com/google/go-containerregistry v0.7.0
github.com/mattn/go-isatty v0.0.14
github.com/mattn/go-runewidth v0.0.12 // indirect
github.com/maxbrunsfeld/counterfeiter/v6 v6.4.1
Expand All @@ -35,43 +35,43 @@ require (
github.com/Azure/go-autorest/logger v0.2.0 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/aws/aws-sdk-go v1.35.24 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.7.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.10.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/cli v20.10.7+incompatible // indirect
github.com/docker/cli v20.10.10+incompatible // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v20.10.7+incompatible // indirect
github.com/docker/docker-credential-helpers v0.6.3 // indirect
github.com/docker/docker v20.10.10+incompatible // indirect
github.com/docker/docker-credential-helpers v0.6.4 // indirect
github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/klauspost/compress v1.13.0 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/opencontainers/image-spec v1.0.2-0.20210730191737-8e42a01fb1b7 // 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/spf13/pflag v1.0.5 // indirect
github.com/vbatts/tar-split v0.11.2 // indirect
github.com/vito/go-interact v0.0.0-20171111012221-fa338ed9e9ec // indirect
golang.org/x/mod v0.4.2 // indirect
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
golang.org/x/net v0.0.0-20211111160137-58aab5ef257a // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08 // indirect
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
golang.org/x/tools v0.1.2 // indirect
golang.org/x/tools v0.1.5 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.26.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
Expand Down
121 changes: 95 additions & 26 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkg/imgpkg/cmd/copy_repo_src_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ func TestToRepoBundleContainingANestedBundle(t *testing.T) {
require.NoError(t, err)

// Ensure that the last operation done against the registry is the creation of the tag
userDefinedTagRequest := (*requestLog)[len(*requestLog)-1]
userDefinedTagRequest := requestLog.Last()
assert.Equal(t, "/v2/library/bundle-copy/manifests/some-tag", userDefinedTagRequest.URL)
require.Equal(t, "PUT", userDefinedTagRequest.Method)
})
Expand Down Expand Up @@ -993,7 +993,7 @@ images:
require.NoError(t, err)

// Ensure that the last operation done against the registry is the creation of the tag
userDefinedTagRequest := (*requestLog)[len(*requestLog)-1]
userDefinedTagRequest := requestLog.Last()
assert.Equal(t, "/v2/library/copied-img/manifests/some-tag", userDefinedTagRequest.URL)
require.Equal(t, "PUT", userDefinedTagRequest.Method)
})
Expand Down
35 changes: 31 additions & 4 deletions test/helpers/fake_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"path/filepath"
"regexp"
"strings"
"sync"
"testing"

"github.com/google/go-containerregistry/pkg/authn"
Expand Down Expand Up @@ -186,13 +187,39 @@ type HTTPRequestLog struct {
URL string
}

// HTTPRequestLogs Slice of HTTP Requests
type HTTPRequestLogs struct {
requests []HTTPRequestLog
lock sync.Mutex
}

// NewHTTPRequestLogs Build a new HTTPRequestLogs struct
func NewHTTPRequestLogs() *HTTPRequestLogs {
return &HTTPRequestLogs{requests: []HTTPRequestLog{}}
}

// Add new HTTP Request to the Log
func (h *HTTPRequestLogs) Add(request HTTPRequestLog) {
h.lock.Lock()
defer h.lock.Unlock()
h.requests = append(h.requests, request)
}

// Last Retrieve Last HTTP Request
func (h *HTTPRequestLogs) Last() HTTPRequestLog {
h.lock.Lock()
defer h.lock.Unlock()

return h.requests[len(h.requests)-1]
}

// WithRequestLogging enables the logging of the HTTP requests sent to the registry
func (r *FakeTestRegistryBuilder) WithRequestLogging() *[]HTTPRequestLog {
var httpRequestLog []HTTPRequestLog
func (r *FakeTestRegistryBuilder) WithRequestLogging() *HTTPRequestLogs {
httpRequestLog := NewHTTPRequestLogs()
parentHandler := r.server.Config.Handler

requestLogging := http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
httpRequestLog = append(httpRequestLog, HTTPRequestLog{
httpRequestLog.Add(HTTPRequestLog{
Method: request.Method,
URL: request.URL.String(),
})
Expand All @@ -202,7 +229,7 @@ func (r *FakeTestRegistryBuilder) WithRequestLogging() *[]HTTPRequestLog {

r.server.Config.Handler = requestLogging

return &httpRequestLog
return httpRequestLog
}

func (r *FakeTestRegistryBuilder) WithIdentityToken(idToken string) {
Expand Down
61 changes: 25 additions & 36 deletions vendor/github.com/containerd/stargz-snapshotter/estargz/build.go

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

Loading

0 comments on commit 2b5ab85

Please sign in to comment.