diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ac2cee34..cd7b097c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -26,6 +26,11 @@ jobs: test-and-build-windows: runs-on: windows-2019 steps: + - name: Set git to use LF and symlinks + run: | + git config --global core.autocrlf false + git config --global core.eol lf + git config --global core.symlinks true - uses: actions/checkout@v4 - name: Set up go uses: actions/setup-go@v5 diff --git a/layout/layout_test.go b/layout/layout_test.go index 14582624..849c5e83 100644 --- a/layout/layout_test.go +++ b/layout/layout_test.go @@ -255,6 +255,16 @@ func testImage(t *testing.T, when spec.G, it spec.S) { h.AssertError(t, err, "has no layers") }) }) + + when("existing config has extra fields", func() { + it.Focus("returns an unmodified digest", func() { + img, err := layout.NewImage(imagePath, layout.FromBaseImagePath(filepath.Join("testdata", "layout", "busybox-sparse"))) + h.AssertNil(t, err) + digest, err := img.Digest() + h.AssertNil(t, err) + h.AssertEq(t, digest.String(), "sha256:f75f3d1a317fc82c793d567de94fc8df2bece37acd5f2bd364a0d91a0d1f3dab") + }) + }) }) when("#WithMediaTypes", func() {