Skip to content

Commit

Permalink
Update failing test expectations and fix typos
Browse files Browse the repository at this point in the history
Signed-off-by: Garrett Cheadle <[email protected]>
  • Loading branch information
cari-lynn authored and gcheadle-vmware committed Aug 26, 2021
1 parent 3d74e40 commit debe17b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
8 changes: 4 additions & 4 deletions pkg/kbld/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ type ImageOverride struct {
NewImage string `json:"newImage"`
Preresolved bool `json:"preresolved,omitempty"`
TagSelection *versions.VersionSelection `json:"tagSelection,omitempty"`
ImageMetas []ImageMeta
ImageMetas []ImageMeta `json:",omitempty"`
}

type ImageMeta struct {
URL string `json:"URL"`
Type string `json:"Type"`
Tag string `json:"Tag"`
URL string `json:"URL,omitempty"`
Type string `json:"Type,omitempty"`
Tag string `json:"Tag,omitempty"`
}

type ImageDestination struct {
Expand Down
3 changes: 1 addition & 2 deletions pkg/kbld/image/preresolved.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ func (i PreresolvedImage) URL() (string, []Meta, error) {
if len(i.metas) > 0 {
var givenMetas []Meta
for _, m := range i.metas {
//TODO: should we change Type to 'preresolved' or keep whatever is given from lockfile?
givenMetas = append(givenMetas, PreresolvedImageSourceURL{Type: m.Type, URL: m.URL, Tag: m.Tag})
givenMetas = append(givenMetas, PreresolvedImageSourceURL{Type: "preresolved", URL: m.URL, Tag: m.Tag})
}
return i.url, givenMetas, nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/kbld/image/resolved.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
ctlreg "github.com/k14s/kbld/pkg/kbld/registry"
)

// ResolvedImage respresents an image that will be resolved into url+digest
// ResolvedImage represents an image that will be resolved into url+digest
type ResolvedImage struct {
url string
registry ctlreg.Registry
Expand Down
2 changes: 1 addition & 1 deletion pkg/kbld/image/tag_selected.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
versions "github.com/vmware-tanzu/carvel-vendir/pkg/vendir/versions/v1alpha1"
)

// TagSelectedImage respresents an image that will be resolved into url+digest
// TagSelectedImage represents an image that will be resolved into url+digest
type TagSelectedImage struct {
url string
selection *versions.VersionSelection
Expand Down
2 changes: 1 addition & 1 deletion pkg/kbld/image/tagged.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
ctlreg "github.com/k14s/kbld/pkg/kbld/registry"
)

// TaggedImage respresents an image that will be tagged when its URL is requested
// TaggedImage represents an image that will be tagged when its URL is requested
type TaggedImage struct {
image Image
imgDst ctlconf.ImageDestination
Expand Down
5 changes: 2 additions & 3 deletions test/e2e/lock_output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ images:
})

expectedOut := `---
---
images:
- image: index.docker.io/library/nginx@sha256:f7988fb6c02e0ce69257d9bd9cf37ae20a60f1df7563c3a2a6abe24160306b8d
- image: index.docker.io/library/nginx@sha256:4a5573037f358b6cdfa2f3e8a9c33a5cf11bcd1675ca72ca76fbe5bd77d0d682
Expand All @@ -242,12 +241,12 @@ metadata:
kbld.k14s.io/images: |
- Metas:
- Tag: 1.15.1
Type: resolved
Type: preresolved
URL: nginx:1.15.1
URL: index.docker.io/library/nginx@sha256:4a5573037f358b6cdfa2f3e8a9c33a5cf11bcd1675ca72ca76fbe5bd77d0d682
- Metas:
- Tag: 1.14.2
Type: resolved
Type: preresolved
URL: nginx:1.14.2
URL: index.docker.io/library/nginx@sha256:f7988fb6c02e0ce69257d9bd9cf37ae20a60f1df7563c3a2a6abe24160306b8d
`
Expand Down

0 comments on commit debe17b

Please sign in to comment.