From dd8111237e55ff9161fba0f8f1d216f8e47ca04a Mon Sep 17 00:00:00 2001 From: Christopher Hunter Date: Tue, 26 Apr 2022 11:54:47 -0700 Subject: [PATCH] bump (go-pivnet): import v7 everywhere dependabot is not bumping major versions so I am doing it manually --- go.mod | 3 ++- go.sum | 6 ++++-- .../acceptance/integration/publish_test.go | 4 ++-- .../fakes/pivnet_product_files_service.go | 2 +- .../pivnet_release_dependencies_service.go | 2 +- .../pivnet_release_upgrade_paths_service.go | 2 +- .../commands/fakes/pivnet_releases_service.go | 20 ++++++++++--------- .../fakes/pivnet_user_groups_service.go | 2 +- internal/commands/publish.go | 6 +++--- internal/commands/publish_test.go | 2 +- 10 files changed, 27 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index c79476252..e5f5b7fb5 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,8 @@ require ( github.com/onsi/ginkgo v1.15.2 github.com/onsi/gomega v1.11.0 github.com/pivotal-cf-experimental/gomegamatchers v0.0.0-20180326192815-e36bfcc98c3a - github.com/pivotal-cf/go-pivnet/v2 v2.0.11 + github.com/pivotal-cf/go-pivnet/v3 v3.0.3 + github.com/pivotal-cf/go-pivnet/v7 v7.0.1 github.com/pivotal-cf/jhanda v0.0.0-20200619200912-8de8eb943a43 github.com/pivotal-cf/om v0.0.0-20211027143906-30b10602e528 golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 diff --git a/go.sum b/go.sum index ff9a4ecc9..aee9f7bfd 100644 --- a/go.sum +++ b/go.sum @@ -361,9 +361,11 @@ github.com/pivotal-cf-experimental/gomegamatchers v0.0.0-20180326192815-e36bfcc9 github.com/pivotal-cf-experimental/gomegamatchers v0.0.0-20180326192815-e36bfcc98c3a/go.mod h1:HdFegZwXOoRNyrqaOX6FC1zMkbA2k1/ktb2anj1E0K8= github.com/pivotal-cf/go-pivnet v1.0.3 h1:rbv/u22FQHMpYy5CQPrCdlqNi+76WyZLGTieAJPl/wM= github.com/pivotal-cf/go-pivnet v1.0.3/go.mod h1:rvEzWli4NJQhX7Z3z0DiEQXsPwC+uE//eIKcpl7S1as= -github.com/pivotal-cf/go-pivnet/v2 v2.0.11 h1:6tzC4zOr7acFPevfP32+8rEU567JlDobqiIejFf8aOc= -github.com/pivotal-cf/go-pivnet/v2 v2.0.11/go.mod h1:Ormn4YO2MooU40LNFwECoLd8XZFwbRcysET+OAn7FLg= +github.com/pivotal-cf/go-pivnet/v3 v3.0.3 h1:xSWlOPbMJA5e+nqjKjIy1SXYxqRKKBxR8jrcnIBgih4= +github.com/pivotal-cf/go-pivnet/v3 v3.0.3/go.mod h1:qmP9QfOQuVuY/lGITecbyjsDpcSGQh619GpqpCuB6ZQ= github.com/pivotal-cf/go-pivnet/v6 v6.0.2/go.mod h1:ymI4gZvp8lf3GNaf1Re+JRV18zU0w8TLBDQB/t8SaFs= +github.com/pivotal-cf/go-pivnet/v7 v7.0.1 h1:5MFZcNyur22u6Qv+trfe13B7peBHvjIl+E7+cvBAk98= +github.com/pivotal-cf/go-pivnet/v7 v7.0.1/go.mod h1:h868WmuLUuavwNHoC6FyGI3hK/6rP3/HCmM8sYLuC8c= github.com/pivotal-cf/jhanda v0.0.0-20200619200912-8de8eb943a43 h1:SYEUxVbqz3U7pJP/tlaXaD08w0rZVuPvCFRodnw/TLY= github.com/pivotal-cf/jhanda v0.0.0-20200619200912-8de8eb943a43/go.mod h1:UXciri1Yqno0IdXxEzwMF91nnwYMPoN95goHWxVtWq8= github.com/pivotal-cf/om v0.0.0-20211027143906-30b10602e528 h1:XYJJ3cozlyyEs9IhoQLA2ZE9GpT4qrtM8V9FhXF4PqY= diff --git a/internal/acceptance/integration/publish_test.go b/internal/acceptance/integration/publish_test.go index 5fb713cdd..567825bb8 100644 --- a/internal/acceptance/integration/publish_test.go +++ b/internal/acceptance/integration/publish_test.go @@ -13,8 +13,8 @@ import ( . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" "github.com/onsi/gomega/gstruct" - pivnet "github.com/pivotal-cf/go-pivnet/v2" - "github.com/pivotal-cf/go-pivnet/v2/logshim" + "github.com/pivotal-cf/go-pivnet/v7" + "github.com/pivotal-cf/go-pivnet/v7/logshim" ) var _ = Describe("publish", func() { diff --git a/internal/commands/fakes/pivnet_product_files_service.go b/internal/commands/fakes/pivnet_product_files_service.go index dd7484452..c44233ca9 100644 --- a/internal/commands/fakes/pivnet_product_files_service.go +++ b/internal/commands/fakes/pivnet_product_files_service.go @@ -4,7 +4,7 @@ package fakes import ( "sync" - pivnet "github.com/pivotal-cf/go-pivnet/v2" + pivnet "github.com/pivotal-cf/go-pivnet/v7" "github.com/pivotal-cf/kiln/internal/commands" ) diff --git a/internal/commands/fakes/pivnet_release_dependencies_service.go b/internal/commands/fakes/pivnet_release_dependencies_service.go index 43840debe..717327df1 100644 --- a/internal/commands/fakes/pivnet_release_dependencies_service.go +++ b/internal/commands/fakes/pivnet_release_dependencies_service.go @@ -4,7 +4,7 @@ package fakes import ( "sync" - pivnet "github.com/pivotal-cf/go-pivnet/v2" + pivnet "github.com/pivotal-cf/go-pivnet/v7" "github.com/pivotal-cf/kiln/internal/commands" ) diff --git a/internal/commands/fakes/pivnet_release_upgrade_paths_service.go b/internal/commands/fakes/pivnet_release_upgrade_paths_service.go index 0670c2d1f..20014edf1 100644 --- a/internal/commands/fakes/pivnet_release_upgrade_paths_service.go +++ b/internal/commands/fakes/pivnet_release_upgrade_paths_service.go @@ -4,7 +4,7 @@ package fakes import ( "sync" - pivnet "github.com/pivotal-cf/go-pivnet/v2" + pivnet "github.com/pivotal-cf/go-pivnet/v7" "github.com/pivotal-cf/kiln/internal/commands" ) diff --git a/internal/commands/fakes/pivnet_releases_service.go b/internal/commands/fakes/pivnet_releases_service.go index 563562a5a..dcbc331d1 100644 --- a/internal/commands/fakes/pivnet_releases_service.go +++ b/internal/commands/fakes/pivnet_releases_service.go @@ -4,15 +4,16 @@ package fakes import ( "sync" - pivnet "github.com/pivotal-cf/go-pivnet/v2" + pivnet "github.com/pivotal-cf/go-pivnet/v7" "github.com/pivotal-cf/kiln/internal/commands" ) type PivnetReleasesService struct { - ListStub func(string) ([]pivnet.Release, error) + ListStub func(string, ...pivnet.QueryParameter) ([]pivnet.Release, error) listMutex sync.RWMutex listArgsForCall []struct { arg1 string + arg2 []pivnet.QueryParameter } listReturns struct { result1 []pivnet.Release @@ -40,18 +41,19 @@ type PivnetReleasesService struct { invocationsMutex sync.RWMutex } -func (fake *PivnetReleasesService) List(arg1 string) ([]pivnet.Release, error) { +func (fake *PivnetReleasesService) List(arg1 string, arg2 ...pivnet.QueryParameter) ([]pivnet.Release, error) { fake.listMutex.Lock() ret, specificReturn := fake.listReturnsOnCall[len(fake.listArgsForCall)] fake.listArgsForCall = append(fake.listArgsForCall, struct { arg1 string - }{arg1}) + arg2 []pivnet.QueryParameter + }{arg1, arg2}) stub := fake.ListStub fakeReturns := fake.listReturns - fake.recordInvocation("List", []interface{}{arg1}) + fake.recordInvocation("List", []interface{}{arg1, arg2}) fake.listMutex.Unlock() if stub != nil { - return stub(arg1) + return stub(arg1, arg2...) } if specificReturn { return ret.result1, ret.result2 @@ -65,17 +67,17 @@ func (fake *PivnetReleasesService) ListCallCount() int { return len(fake.listArgsForCall) } -func (fake *PivnetReleasesService) ListCalls(stub func(string) ([]pivnet.Release, error)) { +func (fake *PivnetReleasesService) ListCalls(stub func(string, ...pivnet.QueryParameter) ([]pivnet.Release, error)) { fake.listMutex.Lock() defer fake.listMutex.Unlock() fake.ListStub = stub } -func (fake *PivnetReleasesService) ListArgsForCall(i int) string { +func (fake *PivnetReleasesService) ListArgsForCall(i int) (string, []pivnet.QueryParameter) { fake.listMutex.RLock() defer fake.listMutex.RUnlock() argsForCall := fake.listArgsForCall[i] - return argsForCall.arg1 + return argsForCall.arg1, argsForCall.arg2 } func (fake *PivnetReleasesService) ListReturns(result1 []pivnet.Release, result2 error) { diff --git a/internal/commands/fakes/pivnet_user_groups_service.go b/internal/commands/fakes/pivnet_user_groups_service.go index f2995946e..0d0979c9d 100644 --- a/internal/commands/fakes/pivnet_user_groups_service.go +++ b/internal/commands/fakes/pivnet_user_groups_service.go @@ -4,7 +4,7 @@ package fakes import ( "sync" - pivnet "github.com/pivotal-cf/go-pivnet/v2" + pivnet "github.com/pivotal-cf/go-pivnet/v7" "github.com/pivotal-cf/kiln/internal/commands" ) diff --git a/internal/commands/publish.go b/internal/commands/publish.go index 07d35d821..9ba0512bf 100644 --- a/internal/commands/publish.go +++ b/internal/commands/publish.go @@ -13,8 +13,8 @@ import ( "github.com/Masterminds/semver" "github.com/go-git/go-billy/v5" - pivnet "github.com/pivotal-cf/go-pivnet/v2" - "github.com/pivotal-cf/go-pivnet/v2/logshim" + "github.com/pivotal-cf/go-pivnet/v7" + "github.com/pivotal-cf/go-pivnet/v7/logshim" "github.com/pivotal-cf/jhanda" "gopkg.in/yaml.v2" @@ -28,7 +28,7 @@ const ( //counterfeiter:generate -o ./fakes/pivnet_releases_service.go --fake-name PivnetReleasesService . PivnetReleasesService type PivnetReleasesService interface { - List(productSlug string) ([]pivnet.Release, error) + List(productSlug string, params ...pivnet.QueryParameter) ([]pivnet.Release, error) Update(productSlug string, release pivnet.Release) (pivnet.Release, error) } diff --git a/internal/commands/publish_test.go b/internal/commands/publish_test.go index 963b2921f..8d14ef795 100644 --- a/internal/commands/publish_test.go +++ b/internal/commands/publish_test.go @@ -13,7 +13,7 @@ import ( "github.com/Masterminds/semver" "github.com/go-git/go-billy/v5" "github.com/go-git/go-billy/v5/memfs" - pivnet "github.com/pivotal-cf/go-pivnet/v2" + "github.com/pivotal-cf/go-pivnet/v7" "github.com/pivotal-cf/kiln/internal/commands" commandsFakes "github.com/pivotal-cf/kiln/internal/commands/fakes"