versionsapi: rename package

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2022-12-01 10:26:35 +01:00
parent 3c62b841ed
commit 9c9c8e3d46
5 changed files with 53 additions and 53 deletions

View file

@ -22,7 +22,7 @@ import (
"github.com/edgelesssys/constellation/v2/internal/constants"
"github.com/edgelesssys/constellation/v2/internal/file"
"github.com/edgelesssys/constellation/v2/internal/sigstore"
"github.com/edgelesssys/constellation/v2/internal/update"
"github.com/edgelesssys/constellation/v2/internal/versionsapi"
"github.com/manifoldco/promptui"
"github.com/spf13/afero"
"github.com/spf13/cobra"
@ -55,7 +55,7 @@ func runUpgradePlan(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
patchLister := update.New()
patchLister := versionsapi.New()
rekor, err := sigstore.NewRekor()
if err != nil {
return fmt.Errorf("constructing Rekor client: %w", err)
@ -335,5 +335,5 @@ type upgradePlanner interface {
}
type patchLister interface {
PatchVersionsOf(ctx context.Context, stream, minor, kind string) (*update.VersionsList, error)
PatchVersionsOf(ctx context.Context, stream, minor, kind string) (*versionsapi.List, error)
}

View file

@ -19,7 +19,7 @@ import (
"github.com/edgelesssys/constellation/v2/internal/config"
"github.com/edgelesssys/constellation/v2/internal/constants"
"github.com/edgelesssys/constellation/v2/internal/file"
"github.com/edgelesssys/constellation/v2/internal/update"
"github.com/edgelesssys/constellation/v2/internal/versionsapi"
"github.com/spf13/afero"
"github.com/spf13/cobra"
"github.com/stretchr/testify/assert"
@ -163,7 +163,7 @@ func TestGetCompatibleImageMeasurements(t *testing.T) {
}
func TestUpgradePlan(t *testing.T) {
availablePatches := update.VersionsList{
availablePatches := versionsapi.List{
Versions: []string{"v1.0.0", "v1.0.1"},
}
@ -488,10 +488,10 @@ func (u stubUpgradePlanner) GetCurrentImage(context.Context) (*unstructured.Unst
}
type stubPatchLister struct {
list update.VersionsList
list versionsapi.List
err error
}
func (s stubPatchLister) PatchVersionsOf(ctx context.Context, stream, minor, kind string) (*update.VersionsList, error) {
func (s stubPatchLister) PatchVersionsOf(ctx context.Context, stream, minor, kind string) (*versionsapi.List, error) {
return &s.list, s.err
}