Skip to content

Commit

Permalink
Merge pull request #315 from kubernetes-sigs/dependabot/go_modules/gi…
Browse files Browse the repository at this point in the history
…thub.com/stretchr/testify-1.9.0

build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0
  • Loading branch information
k8s-ci-robot committed Mar 4, 2024
2 parents a700724 + 14c0ae3 commit fea8da4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/sigstore/rekor v1.3.5
github.com/sigstore/sigstore v1.8.2
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.9.0
github.com/uwu-tools/magex v0.10.0
golang.org/x/oauth2 v0.17.0
k8s.io/apimachinery v0.29.2
Expand Down Expand Up @@ -203,7 +203,6 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.18.2 // indirect
github.com/spiffe/go-spiffe/v2 v2.1.7 // indirect
github.com/stretchr/objx v0.5.1 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tchap/go-patricia/v2 v2.3.1 // indirect
Expand Down
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0=
github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
Expand All @@ -688,8 +686,9 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs=
Expand Down
20 changes: 13 additions & 7 deletions sign/sign_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"context"
"errors"
"log"
"net/http"
"os"
"path/filepath"
"sync"
Expand All @@ -29,7 +30,6 @@ import (
"github.com/google/go-containerregistry/pkg/v1/remote/transport"
"github.com/sigstore/cosign/v2/pkg/cosign"
"github.com/sigstore/rekor/pkg/generated/models"
"github.com/stretchr/testify/http"
"github.com/stretchr/testify/require"
"sigs.k8s.io/release-sdk/sign"
"sigs.k8s.io/release-sdk/sign/signfakes"
Expand Down Expand Up @@ -87,7 +87,7 @@ func TestSignImage(t *testing.T) {
m.Store("gcr.io/fake/honk:99.99.99", true)
mock.ImagesSignedReturns(m, nil)
mock.DigestReturns("sha256:honk69059c8e84bed02f4c4385d432808e2c8055eb5087f7fea74e286b736a", nil)
mock.NewWithContextReturns(&http.TestRoundTripper{}, nil)
mock.NewWithContextReturns(&testRoundTripper{}, nil)
},
assert: func(obj *sign.SignedObject, err error) {
require.NoError(t, err)
Expand Down Expand Up @@ -311,7 +311,7 @@ func TestVerifyImage(t *testing.T) {
m.Store("gcr.io/fake/honk:99.99.99", true)
mock.ImagesSignedReturns(m, nil)
mock.DigestReturns("sha256:honk69059c8e84bed02f4c4385d432808e2c8055eb5087f7fea74e286b736a", nil)
mock.NewWithContextReturns(&http.TestRoundTripper{}, nil)
mock.NewWithContextReturns(&testRoundTripper{}, nil)
},
assert: func(obj *sign.SignedObject, err error) {
require.Nil(t, err)
Expand Down Expand Up @@ -606,6 +606,12 @@ func (fr *FakeReferenceStub) String() string {
return fr.image
}

type testRoundTripper struct{}

func (t *testRoundTripper) RoundTrip(*http.Request) (*http.Response, error) {
return nil, nil
}

func TestImagesSigned(t *testing.T) {
t.Parallel()

Expand All @@ -622,7 +628,7 @@ func TestImagesSigned(t *testing.T) {
{ // Success, signed
prepare: func(mock *signfakes.FakeImpl) {
mock.ParseReferenceReturns(fakeRef, nil)
mock.NewWithContextReturns(&http.TestRoundTripper{}, nil)
mock.NewWithContextReturns(&testRoundTripper{}, nil)
},
assert: func(res *sync.Map, err error) {
require.Nil(t, err)
Expand All @@ -635,7 +641,7 @@ func TestImagesSigned(t *testing.T) {
{ // Success, unsigned
prepare: func(mock *signfakes.FakeImpl) {
mock.ParseReferenceReturns(fakeRef, nil)
mock.NewWithContextReturns(&http.TestRoundTripper{}, nil)
mock.NewWithContextReturns(&testRoundTripper{}, nil)
mock.DigestReturnsOnCall(1, "", &transport.Error{
Errors: []transport.Diagnostic{
{Code: transport.ManifestUnknownErrorCode},
Expand Down Expand Up @@ -672,7 +678,7 @@ func TestImagesSigned(t *testing.T) {
{ // failure on first Digest
prepare: func(mock *signfakes.FakeImpl) {
mock.ParseReferenceReturns(fakeRef, nil)
mock.NewWithContextReturns(&http.TestRoundTripper{}, nil)
mock.NewWithContextReturns(&testRoundTripper{}, nil)
mock.DigestReturns("", errTest)
},
assert: func(res *sync.Map, err error) {
Expand All @@ -683,7 +689,7 @@ func TestImagesSigned(t *testing.T) {
{ // failure on second Digest
prepare: func(mock *signfakes.FakeImpl) {
mock.ParseReferenceReturns(fakeRef, nil)
mock.NewWithContextReturns(&http.TestRoundTripper{}, nil)
mock.NewWithContextReturns(&testRoundTripper{}, nil)
mock.DigestReturnsOnCall(1, "", errTest)
},
assert: func(res *sync.Map, err error) {
Expand Down

0 comments on commit fea8da4

Please sign in to comment.