Skip to content

Commit

Permalink
REVERTME: Test Windows failure
Browse files Browse the repository at this point in the history
Signed-off-by: Natalie Arellano <narellano@vmware.com>
  • Loading branch information
natalieparellano committed Feb 2, 2024
1 parent 0515d04 commit 93f1d0b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion layout/layout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func testImage(t *testing.T, when spec.G, it spec.S) {
})

when("existing config has extra fields", func() {
it("returns an unmodified digest", func() {
it.Focus("returns an unmodified digest", func() {
img, err := layout.NewImage(imagePath, layout.FromBaseImagePath(filepath.Join("testdata", "layout", "busybox-latest")))
h.AssertNil(t, err)
digest, err := img.Digest()
Expand Down
7 changes: 7 additions & 0 deletions layout/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ func NewImage(path string, ops ...ImageOption) (*Image, error) {
if err != nil {
return nil, err
}

Check warning on line 25 in layout/new.go

View check run for this annotation

Codecov / codecov/patch

layout/new.go#L24-L25

Added lines #L24 - L25 were not covered by tests
digest, _ := options.BaseImage.Digest()
fmt.Println("XXX Orig", digest)
}
options.MediaTypes = imgutil.GetPreferredMediaTypes(*options)
if options.BaseImage != nil {
options.BaseImage, err = newImageFacadeFrom(options.BaseImage, options.MediaTypes)
if err != nil {
return nil, err
}
digest, _ := options.BaseImage.Digest()
fmt.Println("XXX Facade", digest)
}

if options.PreviousImageRepoName != "" {
Expand All @@ -50,6 +54,9 @@ func NewImage(path string, ops ...ImageOption) (*Image, error) {
return nil, err
}

manifest, _ := cnbImage.RawManifest()
fmt.Println("XXX Manifest: ", string(manifest))

return &Image{
CNBImageCore: cnbImage,
repoPath: path,
Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions new.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ func NormalizedHistory(history []v1.History, nLayers int) []v1.History {
}

func prepareNewWindowsImageIfNeeded(image *CNBImageCore) error {
fmt.Println("XXX Preparing new Windows image...")
configFile, err := getConfigFile(image)
if err != nil {
return err
Expand Down

0 comments on commit 93f1d0b

Please sign in to comment.