diff --git a/go.mod b/go.mod index 76c6ef0b0..9cdaf9ad0 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,6 @@ require ( github.com/onsi/gomega v1.27.10 github.com/opencontainers/image-spec v1.1.0-rc4 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/v7 v7.0.2 github.com/pivotal-cf/jhanda v0.0.0-20200619200912-8de8eb943a43 github.com/pivotal-cf/om v0.0.0-20230707145702-e2ef8fd451b1 diff --git a/go.sum b/go.sum index 98c608411..510f6e750 100644 --- a/go.sum +++ b/go.sum @@ -556,8 +556,6 @@ github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pivotal-cf-experimental/gomegamatchers v0.0.0-20180326192815-e36bfcc98c3a h1:K20a2viyp6kZgY41ESLne0eOXyY9DarmwA4q6zQ686w= 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/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/v6 v6.0.2/go.mod h1:ymI4gZvp8lf3GNaf1Re+JRV18zU0w8TLBDQB/t8SaFs= github.com/pivotal-cf/go-pivnet/v7 v7.0.2 h1:8IYUIXmFEJpuTSIuOM5K4z0tJLPULDPpKJfn+wWLhqk= github.com/pivotal-cf/go-pivnet/v7 v7.0.2/go.mod h1:h868WmuLUuavwNHoC6FyGI3hK/6rP3/HCmM8sYLuC8c= 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 855e2a013..dc752150b 100644 --- a/internal/commands/publish.go +++ b/internal/commands/publish.go @@ -13,8 +13,8 @@ import ( "github.com/Masterminds/semver/v3" "github.com/go-git/go-billy/v5" - "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, _ ...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 ad4e8ed53..761b24e57 100644 --- a/internal/commands/publish_test.go +++ b/internal/commands/publish_test.go @@ -14,7 +14,7 @@ import ( "github.com/go-git/go-billy/v5" "github.com/go-git/go-billy/v5/memfs" - "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"